Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs app.on connection

const app = express();

app.use('/', function (req, res, next) {
  // Add your code for this route here
});

const server = app.listen(3000, function () {
  console.log('Server listening on port 3000');
});

server.on('connection', function (client) {
  // Do your thang here
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nodejs #connection
ADD COMMENT
Topic
Name
1+7 =