Skip to content

Instantly share code, notes, and snippets.

@Ashimi0x
Created November 20, 2019 07:46
Show Gist options
  • Save Ashimi0x/c4d4bfde031b1144b536b701d2fd70c6 to your computer and use it in GitHub Desktop.
Save Ashimi0x/c4d4bfde031b1144b536b701d2fd70c6 to your computer and use it in GitHub Desktop.
var express = require('express')
var path = require('path')
var open = require('open')
var port = 3000;
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