Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 4c2b890

Browse files
committed
Move server out of app, since we want to just focus on the angular side
1 parent dfc8bff commit 4c2b890

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var app = require("./app/server/modules/routes");
1+
var app = require("./server/modules/routes");
22

33
// Start the server
44
var server = app.listen(8000, function() {

app/server/modules/expressConfig.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

server/modules/expressConfig.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
var bodyParser = require('body-parser');
2+
3+
module.exports = function(app, express) {
4+
// Serve static assets from the app folder. This enables things like javascript
5+
// and stylesheets to be loaded as expected. You would normally use something like
6+
// nginx for this, but this makes for a simpler demo app to just let express do it.
7+
app.use("/", express.static("app/"));
8+
9+
// Set the view directory, this enables us to use the .render method inside routes
10+
app.set('views', __dirname + '/../../app/views');
11+
12+
// parse application/x-www-form-urlencoded
13+
app.use(bodyParser.urlencoded({ extended: false }));
14+
15+
// parse application/json
16+
app.use(bodyParser.json());
17+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)