https post
This commit is contained in:
parent
e66c547191
commit
02f9bc14a6
@ -11,10 +11,7 @@ var lookup = [];
|
||||
wss.on('connection', function connection(ws) {
|
||||
lookup[ws.protocol] = ws;
|
||||
});
|
||||
/*{
|
||||
cert: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/cert.pem'),
|
||||
key: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/privkey.pem')
|
||||
}, */
|
||||
|
||||
var server = http.createServer(function (request, response) {
|
||||
response.writeHead(200, {"Content-Type": "text\plain"});
|
||||
request.setEncoding('utf8');
|
||||
@ -35,6 +32,7 @@ var server = http.createServer(function (request, response) {
|
||||
"surname": body[3],
|
||||
"classes_code": body[0]
|
||||
};
|
||||
console.log(body);
|
||||
lookup[body[0]].send(JSON.stringify(send_array));
|
||||
});
|
||||
} catch (e) {console.log(e)}
|
||||
|
Loading…
Reference in New Issue
Block a user