I love https://deno.land/ and want to use it more! This is a rewrite of the old C# API server (I don't know how to write C# anymore...) into JS/TS which is supposed to match it almost exactly.
Comments:
It was really easy!
We use https://github.com/oakserver/oak which made the HTTP server really easy to write, it includes multipart-form and JSON handling and more
JS async/await for long polling
We have tests! And I think they are pretty good!
New features:
The /nextinqueue/<printername> endpoint can also give a PNG file, if the Accept header is set to accept PNG or HTML. This made it easier to debug the server, and it might make it easier to connect printers that are not a HOIN HOP H58 (although the 384 width is still baked in).
TODO:
[ ] Contrast & brightness?
[ ] rate limit?
[x] remove index.html?
[x] Identity test
[x] Change client python script to use longer timeout that 10secs
[x] Don't use /api/ prefix? Change cloudflare?
[x] queuesize? with passwd?
[x] Cancelling the nextinqueue request should stop waiting in queue
I love https://deno.land/ and want to use it more! This is a rewrite of the old C# API server (I don't know how to write C# anymore...) into JS/TS which is supposed to match it almost exactly.
Comments:
New features:
/nextinqueue/<printername>
endpoint can also give a PNG file, if theAccept
header is set to accept PNG or HTML. This made it easier to debug the server, and it might make it easier to connect printers that are not a HOIN HOP H58 (although the 384 width is still baked in).TODO:
/api/
prefix? Change cloudflare?queuesize
? with passwd?