3. Introduction to Web Backend Using JavaScript
Setting Up a Simple Node.js Server
npm init -ynpm install expressconst express = require('express'); const app = express(); const port = 5000; app.get('/', (req, res) => { res.send('Hello from the backend!'); }); app.listen(port, () => { console.log(`Server running at http://localhost:${port}`); });node server.js
Last updated