For some reason after I refactored getting the html into it's own function bent does not work anymore and I get a weird issue which completely breaks the server somehow....
![image](https://user-images.githubusercontent.com/68497216/201493677-d48e1ed7-bb99-484e-b0c3-3c29418d8fc6.png)
I have not yet tried doing it as I was doing it before but I am just putting this issue out there to see for your opinion @JudeDavis1
TASKS:
Of course can't forget the logs!
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] starting node ./build/server.js
Server running on http://localhost:3000
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10) {
statusCode: 404,
json: [AsyncFunction (anonymous)],
text: [Function (anonymous)],
arrayBuffer: [Function (anonymous)],
headers: {
'content-type': 'text/html; charset=utf-8',
'content-length': '7101',
'x-frame-options': 'SAMEORIGIN',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1;mode=block',
'last-modified': 'Wed, 02 Nov 2022 04:07:08 GMT',
etag: 'W/"bbc36ba44946a224148bb31b890bea59"',
'content-encoding': 'gzip',
'cache-control': 'public, max-age=21600, s-maxage=21600',
expires: 'Sun, 13 Nov 2022 02:35:55 GMT',
date: 'Sat, 12 Nov 2022 20:35:55 GMT',
connection: 'close',
vary: 'Accept-Encoding',
'strict-transport-security': 'max-age=31536000'
}
}
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10) {
statusCode: 404,
json: [AsyncFunction (anonymous)],
text: [Function (anonymous)],
arrayBuffer: [Function (anonymous)],
headers: {
'content-type': 'text/html; charset=utf-8',
'content-length': '7101',
'x-frame-options': 'SAMEORIGIN',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1;mode=block',
'last-modified': 'Wed, 02 Nov 2022 04:07:08 GMT',
etag: 'W/"bbc36ba44946a224148bb31b890bea59"',
'content-encoding': 'gzip',
'cache-control': 'public, max-age=21600, s-maxage=21600',
expires: 'Sun, 13 Nov 2022 02:35:55 GMT',
date: 'Sat, 12 Nov 2022 20:35:55 GMT',
connection: 'close',
vary: 'Accept-Encoding',
'strict-transport-security': 'max-age=31536000'
}
}
StatusError: Not Found
at ClientRequest. (H:\wol-api\src\backend\node_modules\bent\src\nodejs.js:133:23)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
at TLSSocket.socketOnData (node:_http_client:534:22)
at TLSSocket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)