Include remotedev-app

This commit is contained in:
Jhen
2016-02-10 12:29:12 +08:00
parent f46624ff27
commit 7dbd60c155
2 changed files with 50 additions and 3 deletions

View File

@ -1,3 +1,4 @@
var path = require('path');
var express = require('express');
module.exports.run = function(worker) {
@ -7,9 +8,7 @@ module.exports.run = function(worker) {
httpServer.on('request', app);
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.sendFile(path.join(__dirname, 'index.html'));
});
app.post('/', function(req, res) {
if (!req.body.data) return res.status(404).end();