-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
50 lines (41 loc) · 1.39 KB
/
app.js
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* Module dependencies.
*/
var express = require('express'),
staticPages = require('./routes/staticpages.js'),
externals = require('./routes/externals.js'),
twitter = require('./routes/twitterReq.js'),
http = require('http'),
path = require('path');
var app = express();
var n = 0;
// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.engine('html', require('ejs').renderFile);
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));
// development only
if ('development' == app.get('env')) {
app.use(express.errorHandler());
}
app.get('/', staticPages.index);
app.get('/webGL', staticPages.generator);
app.get('/calendarDemo', staticPages.calendar);
app.get('/aboutMe', staticPages.about);
app.get('/github', externals.github);
app.get('/cargo', externals.cargo);
app.get('/hashtags', externals.hashtags);
app.get('/LinkedIn', externals.linkedin);
app.get('/resume', staticPages.resume);
app.get('/fml', staticPages.fml);
app.get('/ideaful-widget', staticPages.ideafulWidget);
app.get('/hydronics', staticPages.hydro);
app.get('/api/tweets', twitter);
http.createServer(app).listen(app.get('port'), function(){
console.log('Express server listening on port ' + app.get('port'));
});