Created
April 15, 2020 05:22
-
-
Save abidtkg/167709ea0c6b098d39f87fd3c73a0a9b to your computer and use it in GitHub Desktop.
Basic Structure Of Node Express
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
// BASIC ROUTING | |
app.get('/', (req, res) => { | |
res.status(200).json({message: "Hello From NodeJS Server}); | |
}); | |
// PORT TO LISTEN http://localhost:3000/ | |
app.listen(3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment