aREST icon indicating copy to clipboard operation
aREST copied to clipboard

serve rest on an special uri

Open LarsES8266 opened this issue 8 years ago • 5 comments

I would like to run static webpages and the rest service parallel, it seems as long as i pass the client handle from webservice to rest, it is not possible anymore to serve other content ... but may be i am wrong....

i would like to have the rest service on /rest/digital etc...

and serve my UI on / or /ui/index.html

is that possible ?

Thanks in advance

BR Lars

LarsES8266 avatar Jul 17 '17 13:07 LarsES8266

I've been using this code on #152 :

WiFiClient espClient;
WiFiClient espClient2;

which creates 2 clients to handle two different tasks.

nandorrb avatar Jul 17 '17 14:07 nandorrb

how so sou handle, which Client processes which uri ?

LarsES8266 avatar Jul 18 '17 08:07 LarsES8266

how do you...

LarsES8266 avatar Jul 18 '17 08:07 LarsES8266

i had a look on #152 do the clients run on the same port? i think rest and mqtt client use different ports....

LarsES8266 avatar Jul 18 '17 09:07 LarsES8266

Hello, that's outside of the core of aREST for now, I'd look at the official HTTP server example from the ESP8266 repo to see how to do that :)

marcoschwartz avatar Aug 03 '17 19:08 marcoschwartz