Skip to content

Instantly share code, notes, and snippets.

@stableShip
Last active August 29, 2015 14:24
Show Gist options
  • Save stableShip/c3c0858b879e0d9e611d to your computer and use it in GitHub Desktop.
Save stableShip/c3c0858b879e0d9e611d to your computer and use it in GitHub Desktop.
项目部署文档
title: "leancloud项目部署文档"
date: 2015-07-06 11:02:07
tags:leancloud
---
#[leancloud自带文档](https://leancloud.cn/docs/leanengine_guide-python.html)
# 运行环境
* [nodejs](http://nodejs.org/)
* [python2.7](https://www.python.org/)
* Windows、Linux 或 MacOS 操作系统
# 本地部署
## 下载源码
`git clone http://git.meiriq.com/zhoujie/billionaire_server.git`
## 安装依赖包
进入目录:
`cd billionaire_server`
安装依赖包:
`pip install -Ur requirements.txt`
##运行:
`python wsgi.py`访问[ http://localhost:3000 ]
#部署到leancloud:
进入目录:
`cd billionaire_server`
[安装leancloud命令行工具](https://leancloud.cn/docs/cloud_code_commandline.html):
`npm install -g avoscloud-code`
添加应用信息:
`avoscloud add <appName> <appId>`
设置webhosting:
[相关链接](https://leancloud.cn/docs/leanengine_guide-python.html#Web_Hosting)
发布到leancloud中:
`avoscloud deploy` 访问 dev.yourAPP.avosapps.com
`avoscloud publish` 访问 yourAPP.avosapps.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment