-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
41 lines (28 loc) · 833 Bytes
/
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
var request = require('request');
var express = require('express');
var mustacheExpress = require('mustache-express');
var app = express();
app.use(express.static(__dirname + '/public'));
app.engine('mustache', mustacheExpress());
app.set('view engine', 'mustache');
app.set('views', __dirname + '/views');
app.get('/', function( req, res ){
res.render('dashboard');
});
app.get('/setup', function( req, res ){
res.render('setup');
});
app.get('/sign_up', function( req, res ){
res.render('sign_up');
});
app.get('/sign_in', function( req, res ){
res.render('sign_in')
});
app.get('/log_out', function( req, res ){
res.send(200)
});
var server = app.listen(3000, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Hopi running at http://%s:%s', host, port);
});