2016-10-06 10:16:07 +00:00
|
|
|
|
|
|
|
var express = require ('express');
|
2016-10-06 13:32:03 +00:00
|
|
|
var cors = require ('cors');
|
2016-10-06 10:16:07 +00:00
|
|
|
|
2016-10-07 09:44:24 +00:00
|
|
|
var port = 3000;
|
|
|
|
var routesUrl = '/private/salix.routes.js';
|
2016-10-06 10:16:07 +00:00
|
|
|
|
|
|
|
function getDefault (res, res)
|
|
|
|
{
|
|
|
|
res.sendStatus (404);
|
|
|
|
}
|
|
|
|
|
|
|
|
function onListen ()
|
|
|
|
{
|
2016-10-07 09:44:24 +00:00
|
|
|
console.log ('HTTP server started on port '+ port);
|
2016-10-06 10:16:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var app = express ();
|
2016-10-07 09:44:24 +00:00
|
|
|
app.use ('/private', cors (), express.static (__dirname +'/build/private'));
|
2016-10-06 13:32:03 +00:00
|
|
|
app.all (/.*/, cors (), getDefault);
|
2016-10-07 09:44:24 +00:00
|
|
|
app.listen (port, onListen);
|
2016-10-06 10:16:07 +00:00
|
|
|
|