-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.7.0 #119
0.7.0 #119
Changes from 1 commit
5b13b5c
b57ed78
59b821b
d8303d3
08df531
f8f559f
76aba03
c67a6ac
8c659ab
9840157
36dbc51
b226073
41d575d
9b279da
4ac2766
8e4e617
b7591b2
0e84913
460b8f2
45e6c7f
906fe8d
15c45d6
eaf9b39
308ade7
8552369
9bb2008
f3b931d
17cf0e8
c9e28df
c263928
f5c5642
7831c64
38de552
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,47 +69,37 @@ You can use routing-controllers with [express.js][1] or [koa.js][2]. | |
|
||
`npm install reflect-metadata --save` | ||
|
||
and make sure to import it in a global place, like app.ts: | ||
and make sure to import it before you use routing-controllers: | ||
|
||
```typescript | ||
import "reflect-metadata"; | ||
``` | ||
|
||
3. ES6 features are used, if you are using old version of node.js you may need to install | ||
[es6-shim](https://github.com/paulmillr/es6-shim): | ||
|
||
`npm install es6-shim --save` | ||
|
||
and import it in a global place like app.ts: | ||
|
||
```typescript | ||
import "es6-shim"; | ||
``` | ||
|
||
4. Install framework: | ||
3. Install framework: | ||
|
||
**a. If you want to use routing-controllers with *express.js*, then install it and all required dependencies:** | ||
|
||
`npm install express body-parser multer --save` | ||
|
||
Optionally you can also install its [typings](https://github.com/typings/typings): | ||
Optionally you can also install their typings: | ||
|
||
`typings install dt~express dt~serve-static --save --global` | ||
`npm install @types/express @types/body-parser @types/multer --save` | ||
|
||
**b. If you want to use routing-controllers with *koa 2*, then install it and all required dependencies:** | ||
|
||
`npm install koa@next koa-router@next koa-bodyparser@next koa-multer --save` | ||
`npm install koa koa-router koa-bodyparser koa-multer --save` | ||
|
||
Optionally you can also install its [typings](https://github.com/typings/typings): | ||
Optionally you can also install their typings: | ||
|
||
`typings install dt~koa --save --global` | ||
`typings install @types/koa --save --global` | ||
|
||
5. Its important to set these options in `tsconfig.json` file of your project: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have skipped There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes I didnt worked on readme yet, will completely update it tomorrow and let you know once again |
||
|
||
```json | ||
{ | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true | ||
"experimentalDecorators": true, | ||
"lib": ["es6"] | ||
} | ||
``` | ||
|
||
|
@@ -156,7 +146,6 @@ You can use routing-controllers with [express.js][1] or [koa.js][2]. | |
2. Create a file `app.ts` | ||
|
||
```typescript | ||
import "es6-shim"; // this shim is optional if you are using old version of node | ||
import "reflect-metadata"; // this shim is required | ||
import {createExpressServer} from "routing-controllers"; | ||
import "./UserController"; // we need to "load" our controller before call createServer. this is required | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm install 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆