-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (18 loc) · 664 Bytes
/
app.js
File metadata and controls
25 lines (18 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var express = require('express');
var http = require('http');
var path = require('path');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
global.__base = __dirname + '/'; //We create the global var __base to do the requires more easily.
var app = express();
// ALL ENVITORIMENTS
app.set('port', process.env.PORT || 3000);
//app.use(bodyParser({ type: 'application/*+json' }))
// CONTROLLERS
var main = require('./controllers/main');
// ROUTES
app.use(main);
var server = http.createServer(app).listen(app.get('port'), function(){
console.log("Homecheker working! on port "+app.get('port'));
});
module.exports = app;