Skip to content

Commit

Permalink
Merge pull request #1 from shipengqi/3.0.0-rc3
Browse files Browse the repository at this point in the history
v3.0.0-rc3
  • Loading branch information
shipengqi committed May 16, 2020
2 parents f8b34c9 + 227e70f commit 98d70d3
Show file tree
Hide file tree
Showing 9 changed files with 692 additions and 293 deletions.
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<a href="https://codecov.io/gh/shipengqi/sactive-web">
<img alt="Build Status" src="https://img.shields.io/codecov/c/github/shipengqi/sactive-web.svg?style=flat-square">
</a>
<a href="http://nodejs.org/download/">
<img alt="License" src="https://img.shields.io/node/v/sactive-web.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/sactive-web">
<img alt="NPM version" src="https://img.shields.io/npm/v/sactive-web.svg?style=flat-square">
</a>
Expand All @@ -36,10 +39,9 @@ npm install sactive-web
## Features

- Dependency injection.
- Router, based on [koa-router](https://github.com/alexmingoia/koa-router).
- Router group.
- Router, router group, based on [koa-router](https://github.com/alexmingoia/koa-router).
- Interceptors.
- Based on [Koa](https://github.com/koajs/koa).
- Based on [Koa2](https://github.com/koajs/koa).

## Example

Expand Down Expand Up @@ -70,31 +72,13 @@ app.group('/v3/')
app.listen(8080);
```

## API Reference
## Documentation
- [Usage Guide](./docs/README.md)
- [API Reference](./docs/api.md)

[API Reference](https://www.shipengqi.top/sactive-web) .

## Babel setup
If you're not using node `v7.6+`, you can use `babel`:

```javascript
//entry file
require('babel-register');
const app = require('./app');
```

Add the following to `.babelrc`:
```javascript
{
"presets": [
["env", {
"targets": {
"node": true
}
}]
]
}
```
If you're not using `node v7.6+`, you can refer [koa installation](https://koajs.com/#introduction).

## Debugging
sactive-web along with many of the libraries it's built with support the __DEBUG__ environment variable from [debug](https://github.com/visionmedia/debug) which provides simple conditional logging.
Expand Down Expand Up @@ -125,5 +109,5 @@ npm run test:cov
```

## TODO
- Documentations
- `Application.allowedMethods` implementation.
- Benchmark test
2 changes: 1 addition & 1 deletion docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ MARKDOWN_DOCS_DIR="${PROJECT_ROOT}/docs"

node_modules/.bin/jsdoc2md \
--files "lib/**/*.js" \
> "${MARKDOWN_DOCS_DIR}/README.md"
> "${MARKDOWN_DOCS_DIR}/api.md"

0 comments on commit 98d70d3

Please sign in to comment.