Removed extra logging
This commit is contained in:
parent
bb6e4bec0d
commit
018b008915
@ -15,10 +15,6 @@ declare module 'express-session' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function registerMiddlewares(app: Application) {
|
export function registerMiddlewares(app: Application) {
|
||||||
if (process.env.NODE_ENV !== 'test') {
|
|
||||||
app.use(logger('dev'))
|
|
||||||
}
|
|
||||||
|
|
||||||
app.use(express.json())
|
app.use(express.json())
|
||||||
app.use(express.urlencoded({ extended: false }))
|
app.use(express.urlencoded({ extended: false }))
|
||||||
app.use(cookieParser())
|
app.use(cookieParser())
|
||||||
@ -33,4 +29,8 @@ export function registerMiddlewares(app: Application) {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
app.use(express.static(WEBUI_DIR))
|
app.use(express.static(WEBUI_DIR))
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
app.use(logger('dev'))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ import wsModules from './modules'
|
|||||||
export const registerWebsocket = (wss: WsServer) => {
|
export const registerWebsocket = (wss: WsServer) => {
|
||||||
wss.on('connection', ws => {
|
wss.on('connection', ws => {
|
||||||
ws.on('message', message => {
|
ws.on('message', message => {
|
||||||
consoleInfo(`Received: ${message}`)
|
|
||||||
|
|
||||||
const data = JSON.parse(message.toString())
|
const data = JSON.parse(message.toString())
|
||||||
|
|
||||||
wsModules.forEach(module => {
|
wsModules.forEach(module => {
|
||||||
|
Loading…
Reference in New Issue
Block a user