Giter Club home page Giter Club logo

monkeyeye-server's Introduction

MonkeyEye-Server

猿眼电影订票系统服务端

安装

  1. 安装Python2.7
  2. 安装依赖
sudo apt-get install libmysqlclient-dev python-dev redis-server   # Ubuntu 下
sudo yum install mysql-devel python-dev redis                     # CentOS 下
  1. 克隆仓库后,切换到项目文件夹,在项目文件夹下打开终端,安装虚拟环境virtualenv
pip install virtualenv
  1. 新建虚拟环境
virtualenv venv
  1. 激活虚拟环境
source venv/bin/activate       # Linux 下
venv\scripts\activate          # Windows 下
  1. 安装第三方模块
pip install -r requirements

运行

  1. 切换主程序目录
cd Flask-Server/
  1. 运行项目
gunicorn -c gunicornConf.py server:app
或者
python server.py

注意 运行项目前,需要在Flask-Server目录下新建instance目录,并在instance目录下新建__init__.py文件和config.py文件,在config.py中添加项目的私密配置

SECRET_KEY = 密钥
SQLALCHEMY_DATABASE_URI = 数据库链接
APPKEY = 短信服务key
APPSECRET = 短信服务secret
ADMIN = (管理员用户名, 管理员密码)
MAILSERVER = 邮件服务器
MAILKEY = 邮件服务器key
REDIS = (redis服务器, redis密码)
  1. 管理系统

运行项目之后访问 http://localhost:5000/admin 进入后台管理系统,访问 http://localhost:5000/swagger 进入 Swagger UI 界面,可查看和测试 API。

数据模型

数据模型

API

Swagger UI

monkeyeye-server's People

Contributors

nevershow avatar

Watchers

hudawei996 avatar

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.