Created
April 14, 2014 17:21
-
-
Save cuth/10667008 to your computer and use it in GitHub Desktop.
Run a local express server on the current directory's static files using node
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 host = "127.0.0.1"; | |
var port = 1337; | |
var express = require("express"); | |
var app = express(); | |
app.use('/', express.static(__dirname + '/')); | |
app.listen(port, host); | |
console.log('Running server at http://localhost:' + port + '/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you sir