美文网首页
前后端server配置

前后端server配置

作者: 33jubi | 来源:发表于2019-11-19 08:44 被阅读0次

    后台

    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
    

    代码之后发

    相关文章

      网友评论

          本文标题:前后端server配置

          本文链接:https://www.haomeiwen.com/subject/yaoiictx.html