https://github.com/killme2008/ping-leancloud
Ping LeanCloud
https://github.com/killme2008/ping-leancloud
Last synced: 10 months ago
JSON representation
Ping LeanCloud
- Host: GitHub
- URL: https://github.com/killme2008/ping-leancloud
- Owner: killme2008
- Created: 2016-09-20T09:27:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-29T10:19:35.000Z (about 9 years ago)
- Last Synced: 2025-03-12T20:48:54.580Z (over 1 year ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Getting started
一个简单的使用 Express 4 的 Node.js 应用。
可以运行在 LeanEngine Node.js 运行时环境。
## 一键部署
[](https://leancloud.cn/1.1/functions/_ops/deploy-button)
## 本地运行
首先确认本机已经安装 [Node.js](http://nodejs.org/) 运行环境和 [LeanCloud 命令行工具](https://www.leancloud.cn/docs/leanengine_cli.html),然后执行下列指令:
```
$ git clone git@github.com:leancloud/node-js-getting-started.git
$ cd node-js-getting-started
```
安装依赖:
```
npm install
```
关联应用:
```
lean app add origin
```
这里的 appId 填上你在 LeanCloud 上创建的某一应用的 appId 即可。origin 则有点像 Git 里的 remote 名称。
启动项目:
```
lean up
```
应用即可启动运行:[localhost:3000](http://localhost:3000)
## 部署到 LeanEngine
部署到预备环境(若无预备环境则直接部署到生产环境):
```
lean deploy
```
将预备环境的代码发布到生产环境:
```
lean publish
```
## 相关文档
* [LeanEngine 指南](https://leancloud.cn/docs/leanengine_guide-node.html)
* [JavaScript 指南](https://leancloud.cn/docs/js_guide.html)
* [JavaScript SDK API](https://leancloud.cn/api-docs/javascript/index.html)
* [命令行工具详解](https://leancloud.cn/docs/cloud_code_commandline.html)
* [LeanEngine FAQ](https://leancloud.cn/docs/cloud_code_faq.html)