Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Serve initial index.html #58

Answered by Theldus
SavageStyle asked this question in Q&A
Discussion options

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.

You must be logged in to vote

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.

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Answer selected by Theldus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /