-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (20 loc) · 738 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
/*var bcrypt = require('bcryptjs');
bcrypt.hash('admin', 10, function(err, hash){
console.log('admin', err, hash);
});*/
var express = require('express');
var app = express();
var path = require('path');
var _host = '127.0.0.1';
var port = 3000;
app.use('/example', express.static(__dirname + '/example'));
app.use('/src', express.static(__dirname + '/src'));
app.use('/bower_components', express.static(__dirname + '/bower_components'));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname + '/example/index.html'));
});
var server = app.listen(port, function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://'+_host+':'+port);
});