Git Product home page Git Product logo

backend's Introduction

SEN-Wanted Server

SEN-Wanted订餐app服务端

安装

1.安装python2.7
2.为保证系统安全,建议安装虚拟环境

pip install virtualenv

3.新建虚拟环境

virtualenv venv

4.激活虚拟环境

source venv/bin/activate       # Linux 下
venv\scripts\activate          # Windows 下

5.在项目目录下,安装第三方需求包

pip install -r requirements

运行

项目结构如下:

Appserver/
├── app
│   ├── static/      # 静态资源文件夹
│   ├── templates/   # 模板文件夹
│   ├── __init__.py  # 初始化文件
│   ├── store_info.py # blueprint
│   ├── user_info.py # blueprint
│   ├── order_info.py # blueprint
│   ├── store_by_id.py # blueprint
│   ├── orders_by_user_id.py # blueprint
│   ├── type_search.py # blueprint
│   ├── user_login.py # blueprint
│   ├── models.py # 数据格式
│   └── view.py # 调用blueprint
├── config.py    # 配置文件
├── createdb.py # 创建数据库
├── client.py # 用户配置文件
├── run.py # 主程序文件
├── requirements     # 需求文件
└── README.md

1.切换到主程序目录

cd Flask-Server/

2.运行项目

python run.py

注意: 在运行项目之前需在config.py中配置数据库相关参数

SQLALCHEMY_DATABASE_URI = 数据库链接
SQLALCHEMY_TRACK_MODIFICATIONS = True

3.管理系统
运行项目之后访问 http://0.0.0.0:5000 可以查看API

API

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.