mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Added the first tests for master.js
This commit is contained in:
1 parent
0e1a7cdb4a
commit
a1db24bd91
4 files changed
+1332
-70
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user