-
Initialize a new Node.js project: npm init -y
-
Install Express.js: npm install express
-
Create app.js with the 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}); }); -
Run the server: node app.js
-
Notifications
You must be signed in to change notification settings - Fork 0
HasithaHja/node1
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published