Changeset View
Changeset View
Standalone View
Standalone View
support/aphlict/server/aphlict_server.js
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | request.on('end', function() { | ||||
'clients.active': clients.getActiveListenerCount(), | 'clients.active': clients.getActiveListenerCount(), | ||||
'clients.total': clients.getTotalListenerCount(), | 'clients.total': clients.getTotalListenerCount(), | ||||
'messages.in': messages_in, | 'messages.in': messages_in, | ||||
'messages.out': messages_out, | 'messages.out': messages_out, | ||||
'log': config.log, | 'log': config.log, | ||||
'version': 6 | 'version': 6 | ||||
}; | }; | ||||
response.writeHead(200, {'Content-Type': 'text/plain'}); | response.writeHead(200, {'Content-Type': 'application/json'}); | ||||
response.write(JSON.stringify(status)); | response.write(JSON.stringify(status)); | ||||
response.end(); | response.end(); | ||||
}); | }); | ||||
} else { | } else { | ||||
response.statusCode = 404; | response.statusCode = 404; | ||||
response.write('404 Not Found\n'); | response.write('404 Not Found\n'); | ||||
response.end(); | response.end(); | ||||
} | } | ||||
Show All 9 Lines |