This commit is contained in:
Adrien Marquès 2018-10-22 18:01:21 +02:00
parent 24db86c7f5
commit c4315c29dc
1 changed files with 2 additions and 2 deletions

View File

@ -11,10 +11,10 @@ const mixer: Mixer = new Mixer();
const server = createServer(mixer.http_handler);
// 2. bind 404 error
server.on('error', (err: Error, sock: Socket) => {
server.on('clientError', (err: Error, sock: Socket) => {
sock.end('HTTP/1.1 400 Bad Request\r\n\r\n');
});
// 3. listen on given port
server.listen(8000);
console.log('+ Listen :8080')
console.log('+ listen 8080')