Skip to content

Instantly share code, notes, and snippets.

@codesynapse
Created February 1, 2018 12:04
Show Gist options
  • Save codesynapse/6a53c423b677cf18ae6e29a89e4a02af to your computer and use it in GitHub Desktop.
Save codesynapse/6a53c423b677cf18ae6e29a89e4a02af to your computer and use it in GitHub Desktop.
NodeJS Express Foundation static file hosting
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