feat(utilities): changes
This commit is contained in:
parent
2e25fe909d
commit
e7385e97cb
1 changed files with 7 additions and 3 deletions
|
|
@ -9,13 +9,17 @@ const PORT = 9000;
|
|||
|
||||
var app = express();
|
||||
app.use((req, res, next) => {
|
||||
console.log(new Date().toTimeString(), req.method, req.originalUrl);
|
||||
console.log(new Date().toTimeString(), 'REQUEST', req.method, req.originalUrl);
|
||||
res.on('finish', function () {
|
||||
console.log(new Date().toTimeString(), 'RESPONSE', req.method, req.originalUrl, this.statusCode);
|
||||
})
|
||||
|
||||
next();
|
||||
});
|
||||
|
||||
app.use('/sourcemaps', sourcemapsReaderServer);
|
||||
app.use('/assist', peerRouter);
|
||||
app.use('/assist', socket.wsRouter);
|
||||
// app.use('/assist', peerRouter);
|
||||
// app.use('/assist/', socket.wsRouter);
|
||||
|
||||
const server = app.listen(PORT, HOST, () => {
|
||||
console.log(`App listening on http://${HOST}:${PORT}`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue