From 3019f8f4efc9f3d89057e8ccd747d54c1616bb32 Mon Sep 17 00:00:00 2001 From: Shivanjan Chakravorty Date: Sat, 26 May 2018 10:49:11 +0530 Subject: [PATCH] Channel description route added --- configs/config.js | 3 +++ routes/frontendRoutes.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/configs/config.js b/configs/config.js index 8f8baa2..fa547a6 100644 --- a/configs/config.js +++ b/configs/config.js @@ -37,6 +37,7 @@ const argv = require('yargs') .default('i', '127.0.0.1') .describe('binary', 'Splitter/Monitor binaries path') .alias('binary', 'b') + .default('b', '../console/bin/') .help('help') .alias('help', 'h') .example('$0 -p 3000 -b /home/bin/', 'Start server on port 3000') @@ -46,6 +47,8 @@ const port = argv.port; const standaloneEngine = argv.standalone !== 'false'; const standaloneEnginePort = argv.engineport; const splitterAddress = argv.sip; +//const splitterBin = argv.binary; +//const monitorBin = argv.binary; const splitterBin = argv.binary; const monitorBin = argv.binary; diff --git a/routes/frontendRoutes.js b/routes/frontendRoutes.js index 4cfcb55..1f4bafa 100644 --- a/routes/frontendRoutes.js +++ b/routes/frontendRoutes.js @@ -5,6 +5,7 @@ const bodyParser = require('body-parser'); const helmet = require('helmet'); const cntrl = require('../controllers/frontendController'); const check = require('../controllers/validators/channelValidator'); +const chnl = require('../controllers/channelController.js') router.use(helmet()); router.use(bodyParser.urlencoded({ extended: false })); @@ -17,5 +18,6 @@ router.post('/edit', [check.edit, check.auth, cntrl.editChannel]); router.get('/remove', cntrl.renderRemoveChannelForm); router.post('/remove', [check.remove, check.auth, cntrl.removeChannel]); router.get('/:channelUrl', cntrl.renderAChannel); +router.get('/channel/:channelUrl',chnl.getChannel); module.exports = router;