salix/server.js

23 lines
432 B
JavaScript

var express = require ('express');
var cors = require ('cors');
var port = 3000;
var routesUrl = '/private/salix.routes.js';
function getDefault (res, res)
{
res.sendStatus (404);
}
function onListen ()
{
console.log ('HTTP server started on port '+ port);
}
var app = express ();
app.use ('/private', cors (), express.static (__dirname +'/build/private'));
app.all (/.*/, cors (), getDefault);
app.listen (port, onListen);