Skip to content

Commit 5471987

Browse files
committed
Set up node server and dependecies
1 parent 32776e4 commit 5471987

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Diff for: package.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "active-directory-javascript-graphapi-v2",
3+
"license": "MIT",
4+
"main": "server.js",
5+
"dependencies": {
6+
"express": "^4.12.3",
7+
"morgan": "^1.5.2",
8+
"path": "^0.11.14"
9+
}
10+
}

Diff for: server.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ var port = 44316; // process.env.PORT || 44316;
1515
app.use(morgan('dev'));
1616

1717
// Set the front-end folder to serve public assets.
18-
app.use("/dist", express.static(path.join(__dirname, "../../dist")));
19-
app.use("/bower_components", express.static(path.join(__dirname, 'bower_components')));
18+
app.use(express.static('JavaScriptSPA'))
2019

2120
// Set up our one route to the index.html file.
2221
app.get('*', function (req, res) {
23-
res.sendFile(path.join(__dirname + '/index_LoginRedirect.html'));
22+
res.sendFile(path.join(__dirname + '/index.html'));
2423
});
2524

2625
// Start the server.
2726
app.listen(port);
28-
console.log('Listening on port ' + port + '...');
27+
console.log('Listening on port ' + port + '...');

0 commit comments

Comments
 (0)