Created
November 20, 2019 07:46
-
-
Save Ashimi0x/c4d4bfde031b1144b536b701d2fd70c6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; | |
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