add compression middleware to worldmap
This commit is contained in:
parent
83c726966a
commit
ac57a17062
@ -4,6 +4,7 @@
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
"compression": "^1.7.4",
|
||||
"express": "^4.16.4",
|
||||
"sockjs": "^0.3.19"
|
||||
},
|
||||
|
@ -18,6 +18,7 @@ module.exports = function(RED) {
|
||||
"use strict";
|
||||
var path = require("path");
|
||||
var express = require("express");
|
||||
var compression = require("compression");
|
||||
var sockjs = require('sockjs');
|
||||
var sockets = {};
|
||||
RED.log.info("Worldmap version " + require('./package.json').version );
|
||||
@ -53,6 +54,7 @@ module.exports = function(RED) {
|
||||
this.log("started at "+this.path);
|
||||
var node = this;
|
||||
var clients = {};
|
||||
RED.httpNode.use(compression());
|
||||
RED.httpNode.use(node.path, express.static(__dirname + '/worldmap'));
|
||||
|
||||
var callback = function(client) {
|
||||
|
Loading…
Reference in New Issue
Block a user