Created
May 26, 2021 03:39
-
-
Save achukka/14288c55dfc859190c1cee974526e367 to your computer and use it in GitHub Desktop.
A Basic 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
import express from "express"; | |
const app = express(); | |
const port = 3000; | |
app.get("/", (req, res) => { | |
res.send("You are listening from express server"); | |
}); | |
app.listen(port, (err) => { | |
if (err) { | |
return console.error(err); | |
} | |
return console.log(`server is listening on ${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment