const app = express(); app.use(router); const port = 4000; app.listen(port); code example
Example: require express server.js
const express = require('express')const app = express() app.get('/', function (req, res) { res.send('Hello World')}) app.listen(3000)