0.18.4 • Published 4 years ago
@sigodenjs/dee v0.18.4
Dee - Powered by express and openapi
Features
- Document driven development
- Use openapi to autobind router, auto parse and verify request.
- Easy to use 3-party service, could be bond through config
Get started
Install Dee web framework
npm i @sigodenjs/dee -S
Init Dee App
import * as Dee from "@sigodenjs/dee";
import * as path from "path";
import * as handlers from "./handlers";
import * as DeeIORedis from "@sigodenjs/dee-ioredis";
Dee({
config: {
ns: "proj",
name: "App"
},
openapize: {
api: path.resolve(__dirname, "./openapi.yaml"), // Openapi doc file
handlers
},
services: {
// auto init and bind service, could be access through app.srvs and req.srvs
redis: {
initialize: DeeIORedis.init,
args: {
port: 6379
}
}
}
}).then(app => {
app.start();
});
Write route handlers
export function hello(req: Request, res: Response, next: NextFunction) {
const name = req.query.name;
req.srvs.redis; // access redis service
res.json(name);
}
Licese
Copyright (c) 2018 sigoden
Licensed under the MIT license.
0.18.4
4 years ago
0.18.3
5 years ago
0.18.2
5 years ago
0.18.1
5 years ago
0.18.0
5 years ago
0.17.0
5 years ago
0.16.2
5 years ago
0.16.1
5 years ago
0.16.0
5 years ago
0.14.1
5 years ago
0.14.0
5 years ago
0.13.0
5 years ago
0.12.3
5 years ago
0.12.2
5 years ago
0.12.1
5 years ago
0.12.0
5 years ago
0.11.13
5 years ago
0.11.12
5 years ago
0.11.11
5 years ago
0.11.10
5 years ago
0.11.9
5 years ago
0.11.8
5 years ago
0.11.7
6 years ago
0.11.6
6 years ago
0.11.5
6 years ago
0.11.4
6 years ago
0.11.2
6 years ago
0.11.1
6 years ago
0.11.0
6 years ago
0.10.6
6 years ago
0.10.5
6 years ago
0.10.2
6 years ago
0.10.1
6 years ago
0.10.0
6 years ago
0.9.1
6 years ago
0.9.0
6 years ago
0.8.5
6 years ago
0.8.4
6 years ago
0.8.3
6 years ago
0.8.2
6 years ago
0.8.1
6 years ago
0.6.6
6 years ago
0.6.4
6 years ago
0.6.2
6 years ago