node express chat app code example
Example 1: node express chat app
const app = require('express')();const http = require('http').createServer(app);app.get('/', (req, res) => { res.send('<h1>Hello world</h1>');});http.listen(3000, () => { console.log('listening on *:3000');});
Example 2: simple socket.io chat
npm install socket.io