Skip to content

Commit ab2ef2a

Browse files
committed
Added script to run Express (http) server to locally serve the project, added multiple Node packages (based on recommendations), and added basic HTML file
1 parent 7d1b12a commit ab2ef2a

File tree

4 files changed

+6469
-0
lines changed

4 files changed

+6469
-0
lines changed

buildScripts/srcServer.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var express = require('express');
2+
var path = require('path');
3+
var open = require('open');
4+
5+
var app = express();
6+
7+
app.get('/', function(req, res) {
8+
res.sendFile(path.join(__dirname, '../src/index.html'));
9+
});
10+
11+
var port = 3000;
12+
13+
app.listen(port, function(err) {
14+
if(err) {
15+
console.log(err);
16+
} else {
17+
open('http://localhost:' + port);
18+
}
19+
});

0 commit comments

Comments
 (0)