Created
February 1, 2018 12:04
-
-
Save codesynapse/6a53c423b677cf18ae6e29a89e4a02af to your computer and use it in GitHub Desktop.
NodeJS Express Foundation static file hosting
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
var express = require('express') | |
var app = express() | |
var router = express.Router() | |
var path = __dirname + '/views/' | |
app.use('/',router) | |
router.get('/',function(req, res){ | |
res.sendFile(path + 'foundation.html'); | |
}) | |
app.listen(3000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment