Merge pull request #5 from jhen0409/master

Include remotedev-app
This commit is contained in:
Mihail Diordiev
2016-03-07 21:43:41 +02:00
3 changed files with 53 additions and 4 deletions

View File

@ -1,3 +1,4 @@
var path = require('path');
var express = require('express');
module.exports.run = function(worker) {
@ -6,10 +7,10 @@ module.exports.run = function(worker) {
var scServer = worker.scServer;
httpServer.on('request', app);
app.set('view engine', 'ejs');
app.get('/', function(req, res) {
res.send('<html><body>' +
'<p>It works! Now point your app and monitor app to connect to this server.</p>' +
'</body></html>');
res.render('index', { port: worker.options.port });
});
app.post('/', function(req, res) {
if (!req.body.data) return res.status(404).end();