mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Moved all the hooks into a hooks directory
This commit is contained in:
parent
6754eed9b4
commit
7b42987407
11 changed files with 36 additions and 36 deletions
|
@ -1,17 +0,0 @@
|
|||
var path = require('path');
|
||||
var minify = require('./utils/Minify');
|
||||
|
||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||
//serve static files
|
||||
args.app.get('/static/js/require-kernel.js', function (req, res, next) {
|
||||
res.header("Content-Type","application/javascript; charset: utf-8");
|
||||
res.write(minify.requireDefinition());
|
||||
res.end();
|
||||
});
|
||||
args.app.get('/static/*', function(req, res)
|
||||
{
|
||||
var filePath = path.normalize(__dirname + "/.." +
|
||||
req.url.replace(/\.\./g, '').split("?")[0]);
|
||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue