Removed extra logging

This commit is contained in:
RemixDev 2022-01-13 01:27:30 +01:00
parent bb6e4bec0d
commit 018b008915
2 changed files with 4 additions and 6 deletions

View File

@ -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'))
}
} }

View File

@ -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 => {