Serve initial index.html #58
-
I can not find the built in way to serve initial index file to the client. Could you please post an example? That would be great include that in wsServer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @SavageStyle, Unfortunately wsServer only provides a WebSocket server, not HTTP. I don't know what your needs are, but you can always make your project's HTML available for the user to open locally. If not suitable, you can use a web server like Apache or Nginx for this. (There are even servers with a single .c, like Althttpd (used on the SQLite site), which I highly recommend looking at). If you want everything in one place, I'm sure there is some small library for HTTP servers in C. |
Beta Was this translation helpful? Give feedback.
Hi @SavageStyle,
Thanks for giving wsServer a try,
Unfortunately wsServer only provides a WebSocket server, not HTTP.
I don't know what your needs are, but you can always make your project's HTML available for the user to open locally. If not suitable, you can use a web server like Apache or Nginx for this.
(There are even servers with a single .c, like Althttpd (used on the SQLite site), which I highly recommend looking at).
If you want everything in one place, I'm sure there is some small library for HTTP servers in C.