Added the first tests for master.js

This commit is contained in:
Danielv123 committed 2017-10-25 11:24:57 +02:00
1 parent 0e1a7cdb4a
commit a1db24bd91
4 files changed
+1332 -70

No files matched your search

+2 -8
View File
@@ -461,14 +461,8 @@ app.get("/api/getFactorioLocale", function(req,res){
getFactorioLocale.asObject(config.factorioDirectory, "en", (err, factorioLocale) => res.send(factorioLocale));
});
// endpoint for getting the chartjs library
app.get("/chart.js", function(req, res) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
// Check it and send it
res.end(fs.readFileSync("node_modules/chartjs/chart.js"));
});
var server = app.listen(config.masterPort || 8080, function () {
console.log("Listening on port %s...", server.address().port);
});
module.exports = app;