mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 15:24:52 +09:00
Working on adding charts to master GUI
This commit is contained in:
1 parent
379f8398c7
commit
5670bdb77a
4 files changed
+67
-2
No files matched your search
@@ -93,6 +93,13 @@ app.get("/inventory", function(req, res) {
|
||||
res.send(docs);
|
||||
});
|
||||
});
|
||||
// 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);
|
||||
|
||||
Reference in new issue
Block a user