gluon_web_remote.js (1063B)
1 var express = require('express'); 2 var app = express(); 3 app.set('view engine', 'ejs'); 4 var helmet = require('helmet') 5 var program = require('commander'); 6 var backend = require("./backend/commands.js"); 7 8 program 9 .command('changeName <ip> <ssh> [token] <newname>', 'Change the Hostname of the router (no Formular support yet!)') 10 .command('changeContact <ip> <ssh> [token] [ccode] <name> <email>', 'Change the Contact of the router (no Formular support yet!)') 11 .command('changeGeo <ip> <ssh> [token] [ccode] <lat> <long> <altitude>', 'Change the Router Position (no Formular support yet!)') 12 .command('MOL <ip> <ssh> <on/off>', 'Activate or deactivate Mesh on Lan') 13 .command('MOW <ip> <ssh> <on/off>', 'Activate or deactivate Mesh on Wan') 14 .parse(process.argv); 15 16 17 // app.use(helmet()) 18 // 19 // // index page 20 // app.get('/', function(req, res) { 21 // res.render('pages/index'); 22 // }); 23 // 24 // app.use('/static', express.static('static')); 25 // 26 // app.listen(process.env.PORT || 3000, function () { 27 // console.log('Example app listening on port 3000!'); 28 // });