Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhamidjamil/node_project_for_port_test
https://github.com/mhamidjamil/node_project_for_port_test
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/mhamidjamil/node_project_for_port_test
- Owner: mhamidjamil
- Created: 2023-05-05T21:03:23.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-11T18:50:09.000Z (about 1 year ago)
- Last Synced: 2024-11-04T11:24:50.586Z (about 2 months ago)
- Language: JavaScript
- Size: 631 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
To build a simple Node.js web app, you can follow these steps:
Install Node.js on your computer.
Create a new folder for your project.
Open the command prompt and navigate to the folder you created.
Run the following command to create a new package.json file:
**npm init**
Install Express by running the following command:
**npm install express --save**
Create a new file called app.js in your project folder.
Add the following code to your app.js file:
const express = require('express')
const app = express()app.get('/', (req, res) => {
res.send('Hello World!')
})app.listen(3000, () => {
console.log('Example app listening on port 3000!')
})
Run the following command to start your server:
**node app.js**
Visit http://localhost:3000 in your web browser.