kaluma-project / kaluma

A tiny JavaScript runtime for RP2040 (Raspberry Pi Pico)
https://kalumajs.org
Apache License 2.0
647 stars 37 forks source link

Error is code example provided on Documentation page for HTTP #596

Closed prithwirajbose closed 1 year ago

prithwirajbose commented 1 year ago

I am referring the documentation page for HTTP here: https://kalumajs.org/docs/api/http

In the http.createServer([requestListener]) section there is small syntax error. It might be very confusing for someone who is starting out new and doesn't know how to debug. Because this syntax error will cause the program to not work when flashed to Pico W.

See in the screenshot below image

Instead of response the variable name should be res. I know this is trivial but I spent some good amount of time overlooking this simple bug and was just about to try back Micropython instead of Kaluma, loosing hope :)

communix commented 1 year ago

@prithwirajbose Thank you. I'll fix the examples in the documents.

communix commented 1 year ago

This issue is fixed.