-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (24 loc) · 907 Bytes
/
index.js
File metadata and controls
28 lines (24 loc) · 907 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
26
27
28
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*'use strict';
*/
//module.exports = require('./lib/express');
var express = require('express');
var app = express();
var path = require('path');
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, './app/html', 'index.html'));
//res.sendFile('d:/JSMentoring/repositoryTask/app/html/index.html');
});
app.use('/lib', express.static('d:/JSMentoring/repositoryTask/bower_components'));
app.use('/js', express.static('d:/JSMentoring/repositoryTask/app/js'));
app.use('/css', express.static('d:/JSMentoring/repositoryTask/app/css'));
var server = app.listen(3000, function() {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);
});