简体   繁体   中英

Hosting a Flask-Angular app for multiple users

I have an Angular app that runs on a Python-Flask server on port 5000. Right now the app works well on local host. But now I want the app to be accessible to multiple users. Seems like I will have to create sessions (as each user will generate some temp data and I'd like this data to be stored in a directory where directory name is session id). How do I proceed with this? Also how can I test this multi user functionality on my local machine since flask only listens to one port.

Use gunicorn( Gunicorn.org ) to run your app, it will automatically create multiple threads to handle requests from multiple users. You can store the temp data on client side in local or session storage and send the required data with each request(**Do not store sensitive data on client side like password)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM