This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-05-27T15:30:36.153Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const keyInputs = [ | |
['n', 1], | |
['e', 10], | |
['w', 100], | |
[' ', 1], | |
['y', 10], | |
['o', 100], | |
['r', 300], | |
['k', 200] | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createServer } = require('http'); | |
const server = createServer((request, response) => { | |
// by default assign maximum of 2KB for Body size if there's no Content-Length | |
let size = Number(request.headers['content-length']) || 2048; | |
let bodyData = Buffer.alloc(size); | |
request.on('data', data => { | |
for (let x = 0; x < size; x++) { | |
bodyData[x] = data[x]; |
OlderNewer