wiki:node_js_test_web_app
Table of Contents
node.js test web app
Create separate directory:
mkdir server && cd server
Make server.js file with following content:
const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => { res.send('Hello World!') }) app.listen(port, () => { console.log(`Example app listening at http://localhost:${port}`) })
Then:
npm install express node server.js
Tested on
- Debian 11 Bullseye
See also
References
wiki/node_js_test_web_app.txt · Last modified: 2021/08/19 10:13 by antisa