Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vlib: add net.http.file, allowing for v -e "import net.http.file; file.serve()" #19348

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

spytheman
Copy link
Member

@spytheman spytheman commented Sep 14, 2023

With this PR, this short snippet will be enough to start a simple http server for the static files, located in the current folder:

import net.http.file
file.serve()

It allows for some customization too:

import net.http.file
file.serve(folder: '~/code/MyProject')

@medvednikov medvednikov merged commit d93488b into vlang:master Sep 14, 2023
35 checks passed
Wertzui123 pushed a commit to Wertzui123/v that referenced this pull request Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants