Server-Side Scripting/Introduction/Node.js (Express)
app.js
edit// Displays 'Hello world!'
//
// References:
// https://repl.it/languages/express
// https://expressjs.com/en/starter/hello-world.html
const express = require('express');
const app = express();
app.get('/', (request, response) => {
response.send('Hello world!');
});
app.listen(port=3000);
Try It
editCopy and paste the code above into the following free online development environment or use your own Node.js (Express) compiler / interpreter / IDE.
- Log in to Repl.it. Create a user account if you don't have one already.