diff --git a/nodeub.js b/nodeub.js index be96d5a0..ce98ae29 100644 --- a/nodeub.js +++ b/nodeub.js @@ -32,7 +32,7 @@ function addGa(html) { " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);", "})();", "" - ].join("\n"); + ].join("\n"); html = html.replace("", ga + "\n\n"); } return html; @@ -53,7 +53,7 @@ function googleAnalyticsMiddleware(data) { } var unblockerConfig = { - prefix: '/proxy/', + prefix: '/run/', responseMiddleware: [ googleAnalyticsMiddleware ] @@ -65,7 +65,7 @@ var unblockerConfig = { app.use(unblocker(unblockerConfig)); // serve up static files *after* the proxy is run -app.use('/', express.static(__dirname + '/public')); +app.use('/', express.static(__dirname + '/nodeub')); // this is for users who's form actually submitted due to JS being disabled or whatever app.get("/no-js", function(req, res) { @@ -76,4 +76,4 @@ app.get("/no-js", function(req, res) { }); // for compatibility with gatlin and other servers, export the app rather than passing it directly to http.createServer -module.exports = app; +module.exports = app; \ No newline at end of file diff --git a/package.json b/package.json index 6e32b515..0952b8f1 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,8 @@ "newrelic": "^1.20.2", "through": "^2.3.8", "unblocker": "*" + }, + "engines": { + "node": ">=6" } } \ No newline at end of file