Last active
December 12, 2017 16:11
-
-
Save danivijay/e0bb66f851f0bb3f49a797423f679070 to your computer and use it in GitHub Desktop.
file to place within buildScripts/
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 path = require('path'); | |
var open = require('open'); | |
var port = 3000; //choose different, if this port not available | |
var app = express(); | |
app.get('/',function(req, res) { | |
res.sendFile(path.join(__dirname, '../src/index.html')); | |
}); | |
app.listen(port, function(err) { | |
if (err) { | |
console.log(err); | |
} else { | |
open('http://localhost:' + port); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment