You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set route = ‘/’, I can go directly to my web page at http://127.0.0.1:8080. But all requests except GET will return 405. Request did not meet this resource's requirements.
app.serve_directory( route='/index', directory_path=os.path.join(os.getcwd(), "templates"), index_file='index.html' )
When I changed route to any other url, all methods went back to normal.
I'm not sure if I'm using it the wrong way or if there's a bug in the serve_directory.
also It works fine as long as you don't set route to '/', but most of the time we want to integrate the front end into the python web and be accessible directly from the root directory
Steps to Reproduce
No response
Your operating system
None
Your Python version (python --version)
None
Your Robyn version
None
Additional Info
No response
The text was updated successfully, but these errors were encountered:
Bug Description
I wasn't sure if this was the right way to use it, but it exceeded my expectations
`app.serve_directory(
route='/',
directory_path=os.path.join(os.getcwd(), "templates"),
index_file='index.html'
)
@app.get('/myget')
def get(request):
return "get"
@app.post('/mypost')
def post(request):
return request.json()`
When I set route = ‘/’, I can go directly to my web page at http://127.0.0.1:8080. But all requests except GET will return 405. Request did not meet this resource's requirements.
app.serve_directory( route='/index', directory_path=os.path.join(os.getcwd(), "templates"), index_file='index.html' )
When I changed route to any other url, all methods went back to normal.
I'm not sure if I'm using it the wrong way or if there's a bug in the serve_directory.
also It works fine as long as you don't set route to '/', but most of the time we want to integrate the front end into the python web and be accessible directly from the root directory
Steps to Reproduce
No response
Your operating system
None
Your Python version (
python --version
)None
Your Robyn version
None
Additional Info
No response
The text was updated successfully, but these errors were encountered: