-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
22 lines (20 loc) · 859 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//BLANK EXPRESS SERVER FOR BASE MEAN APP.
var express = require("express");
var app = express();
var path = require("path");
app.use(express.static(path.join(__dirname,"client")));
app.use(express.static(path.join(__dirname,"bower_components")));
var mongoose = require("mongoose");
//V bodyParse must be loaded before being required by routes.js
var bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({extended:true}));
app.use(bodyParser.json());
//V require needs to be before routes and other mongo requirements...
require("./server/configs/mongoose.js")
require("./server/controllers/dataSSController.js");
require("./server/controllers/userSSController.js");
require("./server/controllers/exerciseSSController.js");
require("./server/configs/routes.js")(app);
app.listen(8001, function(){
console.log("Now listening on port 8001");
})