Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eggjs/aliyun-egg
node web framework for aliyun, base on eggjs
https://github.com/eggjs/aliyun-egg
aliyun egg egg-framework
Last synced: 8 days ago
JSON representation
node web framework for aliyun, base on eggjs
- Host: GitHub
- URL: https://github.com/eggjs/aliyun-egg
- Owner: eggjs
- License: other
- Created: 2017-01-20T09:09:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-11T07:33:48.000Z (about 2 months ago)
- Last Synced: 2024-10-29T21:05:50.402Z (10 days ago)
- Topics: aliyun, egg, egg-framework
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 50
- Watchers: 13
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-egg - aliyun-egg - node web framework for aliyun, base on eggjs (Frameworks)
README
aliyun-egg
=======[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/aliyun-egg.svg?style=flat-square
[npm-url]: https://npmjs.org/package/aliyun-egg
[travis-image]: https://img.shields.io/travis/alibaba/aliyun-egg.svg?style=flat-square
[travis-url]: https://travis-ci.org/alibaba/aliyun-egg
[codecov-image]: https://codecov.io/github/alibaba/aliyun-egg/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/alibaba/aliyun-egg?branch=master
[david-image]: https://img.shields.io/david/alibaba/aliyun-egg.svg?style=flat-square
[david-url]: https://david-dm.org/alibaba/aliyun-egg
[download-image]: https://img.shields.io/npm/dm/aliyun-egg.svg?style=flat-square
[download-url]: https://npmjs.org/package/aliyun-eggEgg framework for Aliyun.
## Requirement
- node >= 4.0.0
## Installation
```bash
$ npm install aliyun-egg --save
```## Usage
Aliyun egg is a framework for nodejs web applation deployed on Aliyun and related services. It has built-in plugins to support Aliyun `RDS`, `OSS` and `Alinode`.
### Use RDS
First you should visit https://cn.aliyun.com/product/rds/mysql?spm=a21gt.99266.416540.38.qyVigh for more detail, and config in `config/config.default.js`.
```js
// config/config.${env}.js
exports.mysql = {
// 单数据库信息配置
client: {
// host
host: 'mysql.com',
// 端口号
port: '3306',
// 用户名
user: 'test_user',
// 密码
password: 'test_password',
// 数据库名
database: 'test',
},
// 是否加载到 app 上,默认开启
app: true,
// 是否加载到 agent 上,默认关闭
agent: false,
};
```### Use OSS
First you should visit https://cn.aliyun.com/product/oss?spm=a21gt.99266.416540.51.qyVigh for more detail, and config in `config/config.default.js`.
```js
exports.oss = {
client: {
accessKeyId: 'your access key',
accessKeySecret: 'your access secret',
bucket: 'your bucket name',
endpoint: 'oss-cn-hongkong.aliyun.com',
timeout: '60s',
},
};```
### Use Alinode
First you should visit https://alinode.aliyun.com/ for more detail, and config in `config/config.default.js`.
```js
exports.alinode = {
appid: 'my app id',
secret: 'my app secret',
};```
### Example
For example you can refer to [aliyun]https://github.com/eggjs/egg-showcase-aliyun-blog
## License
[MIT](LICENSE.txt)