-
new project
-
Terminal
npm init -y
npm i express --save
- new
app.js
const express = require('express');
const app = express();
JS
-port
const port = 3000;
app.listen((port), () => {
console.log(`
Listening on port::: ${port}
`)
})
JS
-route
app.get('/', (req, res) => {
res.send('Hello!')
})
Terminal
-run
node app.js
- visit
http://localhost:3000/
- Screenshot