update
Signed-off-by: Walamana <joniogerg@gmail.com>
This commit is contained in:
parent
761f79f238
commit
c99f540fb9
15
app.js
15
app.js
@ -3,6 +3,12 @@ var cookieParser = require("cookie-parser");
|
||||
var app = express();
|
||||
|
||||
app.use(cookieParser());
|
||||
app.use((req, res, next) => {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
return next();
|
||||
});
|
||||
app.use(express.static(path.join(application_root, "StaticPages")));
|
||||
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
|
||||
|
||||
var uuid = require("uuid/v4");
|
||||
var mysql = require("mysql");
|
||||
@ -136,15 +142,6 @@ var attachToMini = function(mini){
|
||||
}
|
||||
|
||||
|
||||
app.configure(function(){
|
||||
app.use((req, res, next) => {
|
||||
res.setHeader("Access-Control-Allow-Origin", "*");
|
||||
return next();
|
||||
});
|
||||
app.use(express.static(path.join(application_root, "StaticPages")));
|
||||
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
|
||||
});
|
||||
|
||||
app.listen(process.env.PORT);
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user