devicescript icon indicating copy to clipboard operation
devicescript copied to clipboard

Web server / client support?

Open zackify opened this issue 1 year ago • 1 comments

With the pico w, is there any chance of getting a simple web server like micro python has?

I know there is the local cloud stuff that is being worked on, but I would love being able to make a simple server or make http requests to things.

zackify avatar May 26 '23 22:05 zackify

Related to MQTT (https://github.com/microsoft/devicescript/issues/395), supporting different networking setups.

pelikhan avatar May 31 '23 16:05 pelikhan

We are looking into this for the ESP32.

pelikhan avatar Jun 01 '23 17:06 pelikhan

We have added "fetch" and sockets in the latest release (v2.10.*)

pelikhan avatar Jun 06 '23 01:06 pelikhan

Wow that was fast! That’s so awesome thanks

zackify avatar Jun 06 '23 01:06 zackify

Any way for me to know when this will be in the docs? I didn’t see any notes on release either

zackify avatar Jun 06 '23 01:06 zackify

The docs are not quite there yet but the fetch implementation should give you a good idea of how to use sockets.

https://microsoft.github.io/devicescript/developer/net

pelikhan avatar Jun 06 '23 01:06 pelikhan

https://github.com/microsoft/devicescript/blob/main/packages/net/src/fetch.ts

pelikhan avatar Jun 06 '23 01:06 pelikhan

Thanks so much that’s perfect on the client side, just need to learn how I can start a http server next!

Edit: nice I’m reading your socket code. Very helpful

zackify avatar Jun 06 '23 02:06 zackify