summaryrefslogtreecommitdiff
path: root/src/node/hooks
diff options
context:
space:
mode:
authorChad Weider <cweider@oofn.net>2012-03-10 14:13:08 -0800
committerChad Weider <cweider@oofn.net>2012-03-10 14:39:37 -0800
commit1a1f222221266a20ce1adcf839c581e664f88283 (patch)
tree19990d94ade2420bb8a86d2d8c5e4b5d4b91fa97 /src/node/hooks
parentc6b8beabd3712bab24705597fb5103ba371fac34 (diff)
downloadetherpad-lite-1a1f222221266a20ce1adcf839c581e664f88283.zip
Change paths.
Diffstat (limited to 'src/node/hooks')
-rw-r--r--src/node/hooks/express/static.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node/hooks/express/static.js b/src/node/hooks/express/static.js
index 9481eb5a..99701706 100644
--- a/src/node/hooks/express/static.js
+++ b/src/node/hooks/express/static.js
@@ -13,9 +13,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
commonly ETHERPAD_ROOT/node_modules/ep_myplugin/static/js/test.js
*/
- args.app.get(/^\/minified\/plugins\/([^\/]+)\/static\/(.*)/, function(req, res, next) {
+ args.app.get(/^\/javascripts\/lib\/([^\/]+)\/static\/(.*)/, function(req, res, next) {
var plugin_name = req.params[0];
- var modulePath = req.url.split("?")[0].substr("/minified/plugins/".length);
+ var modulePath = req.url.split("?")[0].substr("/javascripts/lib/".length);
var fullPath = require.resolve(modulePath);
if (plugins.plugins[plugin_name] == undefined) {
@@ -35,7 +35,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// Cache both minified and static.
var assetCache = new CachingMiddleware;
- args.app.all('/(minified|static)/*', assetCache.handle);
+ args.app.all('/(javascripts|static)/*', assetCache.handle);
// Minify will serve static files compressed (minify enabled). It also has
// file-specific hacks for ace/require-kernel/etc.
@@ -44,7 +44,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// Setup middleware that will package JavaScript files served by minify for
// CommonJS loader on the client-side.
var jsServer = new (Yajsml.Server)({
- rootPath: 'minified/'
+ rootPath: 'javascripts/src/'
, rootURI: 'http://localhost:' + settings.port + '/static/js/'
});