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

How to i set this to service files from a directory #29

Open
theboyknowsclass opened this issue Mar 8, 2024 · 1 comment
Open

How to i set this to service files from a directory #29

theboyknowsclass opened this issue Mar 8, 2024 · 1 comment

Comments

@theboyknowsclass
Copy link

is it possible to set it to serve plain html files from a '\static' directory say?

@deckerego
Copy link
Owner

You could - see https://github.com/deckerego/ampule/blob/main/examples/webserver/webpages.py as an example of how to retrieve files based on a GET request.

If you wanted to serve up a whole directory, you could create a handler from a base path (say static/) and then look at the request object to determine which file to serve.

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

No branches or pull requests

2 participants