blob: 513d37a9f78a7f9efc7819023c65eaba6266cf2c [file] [log] [blame]
Matteo Scandolocf060772016-05-13 15:54:44 -07001'use strict';
2
3var http = require('http');
4// var httpProxy = require('http-proxy');
5var connect = require('connect');
6var serveStatic = require('serve-static');
7var path = require('path');
8
9var conf = {
10 paths: {
11 root: '../../../../../'
12 },
13 port: '8182'
14}
15
16var httpProxyInit = function (baseDir) {
17
18 var app = connect();
19
20 app.use(serveStatic(path.join(__dirname, baseDir)));
21
22 var server = http.createServer(app);
23
24 server.listen(conf.port, function(){
25 console.log('Dev server is up and listening on http://localhost:', conf.port);
26 });
27};
28
29httpProxyInit(conf.paths.root);