Changeset View
Changeset View
Standalone View
Standalone View
support/aphlict/server/lib/AphlictAdminServer.js
| Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | members: { | ||||
| listen: function() { | listen: function() { | ||||
| return this._server.listen.apply(this._server, arguments); | return this._server.listen.apply(this._server, arguments); | ||||
| }, | }, | ||||
| _onrequest: function(request, response) { | _onrequest: function(request, response) { | ||||
| var self = this; | var self = this; | ||||
| var u = url.parse(request.url, true); | var u = url.parse(request.url, true); | ||||
| var instance = u.query.instance || '/'; | var instance = u.query.instance || 'default'; | ||||
| // Publishing a notification. | // Publishing a notification. | ||||
| if (u.pathname == '/') { | if (u.pathname == '/') { | ||||
| if (request.method == 'POST') { | if (request.method == 'POST') { | ||||
| var body = ''; | var body = ''; | ||||
| request.on('data', function(data) { | request.on('data', function(data) { | ||||
| body += data; | body += data; | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||