author | Michael Krelin <hacker@klever.net> | 2014-07-01 17:49:10 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2014-07-01 17:49:10 (UTC) |
commit | a6e5df547739ac91055ae0ae4928447c9ec50a98 (patch) (side-by-side diff) | |
tree | e5d2e63d8c782bb471fa95bd8c7d6d21e3c322b0 /backend/node/src/clipperz.js | |
parent | b9ee39b810aae10da83534776028585309b53a24 (diff) | |
download | clipperz-a6e5df547739ac91055ae0ae4928447c9ec50a98.zip clipperz-a6e5df547739ac91055ae0ae4928447c9ec50a98.tar.gz clipperz-a6e5df547739ac91055ae0ae4928447c9ec50a98.tar.bz2 |
Diffstat (limited to 'backend/node/src/clipperz.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | backend/node/src/clipperz.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/node/src/clipperz.js b/backend/node/src/clipperz.js index 842de31..2a3df73 100644 --- a/backend/node/src/clipperz.js +++ b/backend/node/src/clipperz.js @@ -2,6 +2,8 @@ var FS = require('fs'); var CRYPTO = require('crypto'); var BIGNUM = require('bignum'); var ASYNC = require('async'); +var EXPRESS = require('express'); +var PATH = require('path'); var express_store = require('express-session').Store; @@ -579,6 +581,10 @@ var CLIPPERZ = module.exports = function(CONFIG) { }; rv.__defineGetter__('session_store',function(){ return function(o) { return new (clipperz_store(PG))(o) } }); + (rv.router = require('express').Router()) + .post('/json',rv.json).get('/dump',rv.dump) + .use(EXPRESS.static(PATH.join(__dirname,'htdocs/'))); + return rv; }; |