后台
cd backend
# create a sandbox for the backend
virtualenv -p /usr/local/bin/python3 env
# enter sandbox
source env/bin/activate
# set up sandbox
pip install -r requirements.txt
# run backend! Will print out a bunch of info including a line like this:
# * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
# visit the url on this line (e.g. http://127.0.0.1:5000/) to see the backend docs!
python backend_server.py
数据库库可能需要单独安装
比如
pip3 install 'pymongo[srv]'
Once you are done working on the assignment run the following
command to exit the sandbox
deactivate
This method creates a space in which the backend can run without
clashing with any other python packages and issues on your local account. If you don't care you can run the backend in the global space as such.
cd backend
# on your local system this may just be pip and python not pip3 and python3
pip3 install -r requirements.txt
python3 app.py
前端
Quickstart
To start up the frontend server which simply servers everything under the frontend folder:
python3 server.py
代码之后发
网友评论