Nodejs tutorial 1 – How to create your first nodejs app
Nodejs tutorial 1 – How to create your first nodejs app
Source Code
// first app in nodejs
// lets import express
const express = require(“express”)
// install express first
// lets create our first app and call express function
const app = express()
// lets create our first route “/”
app.get(“/”, (req,res)=>{
// I want to send somthing
res.send(“Hello world”)
})
// lets run our app on port 8080
app.listen(8080)