You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
532 B
25 lines
532 B
var express = require('express');
|
|
var http = require('http');
|
|
|
|
var PORT = 8000;
|
|
|
|
|
|
|
|
var app = express();
|
|
app.get('/', function(req, res) {
|
|
var message = req.query["log"]
|
|
console.log(JSON.stringify(message))
|
|
res.send({message: message});
|
|
});
|
|
|
|
app.post('/', function(req, res) {
|
|
var message = req.body["log"]
|
|
console.log(JSON.stringify(message))
|
|
//console.log(req)
|
|
res.send({message: message});
|
|
});
|
|
|
|
http.Server(app).listen(PORT, function() {
|
|
console.log("HTTP server listening on port %s", PORT);
|
|
});
|
|
|
|
|