Created
May 25, 2018 21:51
-
-
Save reyou/2866241a8179fe0fd60f8a4181c6f463 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var express = require("express"); | |
var app = express(); | |
var path = require("path"); | |
app.get('/',function(req,res){ | |
res.sendFile(path.join(__dirname+'/index.html')); | |
//__dirname : It will resolve to your project folder. | |
}); | |
app.get('/about',function(req,res){ | |
res.sendFile(path.join(__dirname+'/about.html')); | |
}); | |
app.get('/sitemap',function(req,res){ | |
res.sendFile(path.join(__dirname+'/sitemap.html')); | |
}); | |
app.listen(3000); | |
console.log("Running at Port 3000"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment