Merge branch 'master' of http://git.d-popov.com/popov/ai-kevin
This commit is contained in:
commit
c0f48327b5
@ -1 +0,0 @@
|
|||||||
7
|
|
@ -3,7 +3,7 @@ if (require('dotenv')) {
|
|||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Starting ws server on port '+ process.env.SERVER_PORT_WS);
|
console.log('Starting ws server on port ' + process.env.SERVER_PORT_WS);
|
||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
const wss = new WebSocket.Server({ port: process.env.SERVER_PORT_WS });
|
const wss = new WebSocket.Server({ port: process.env.SERVER_PORT_WS });
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ app.get('/', (req, res) => {
|
|||||||
|
|
||||||
//accept LOG messages on /log
|
//accept LOG messages on /log
|
||||||
app.post('/log', (req, res) => {
|
app.post('/log', (req, res) => {
|
||||||
console.log("log["+new Date().toISOString() + '] ' + req.body.message);
|
console.log("log[" + new Date().toISOString() + '] ' + req.body.message);
|
||||||
res.send('OK', 200, { 'Content-Type': 'text/plain' });
|
res.send('OK', 200, { 'Content-Type': 'text/plain' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user