@@ -73,11 +73,11 @@ You can use routing-controllers with [express.js][1] or [koa.js][2].
73
73
74
74
1 . Install module:
75
75
76
- ` npm install routing-controllers --save `
76
+ ` npm install routing-controllers `
77
77
78
78
2 . ` reflect-metadata ` shim is required:
79
79
80
- ` npm install reflect-metadata --save `
80
+ ` npm install reflect-metadata `
81
81
82
82
and make sure to import it before you use routing-controllers:
83
83
@@ -89,21 +89,27 @@ You can use routing-controllers with [express.js][1] or [koa.js][2].
89
89
90
90
** a . If you want to use routing - controllers with * express .js * , then install it and all required dependencies :**
91
91
92
- ` npm install express body-parser multer --save `
92
+ ` npm install express body-parser multer `
93
93
94
94
Optionally you can also install their typings :
95
95
96
- ` npm install @types/express @types/body-parser @types/multer --save `
96
+ ` npm install -D @types/express @types/body-parser @types/multer `
97
97
98
98
** b . If you want to use routing - controllers with * koa 2 * , then install it and all required dependencies :**
99
99
100
- ` npm install koa koa-router koa-bodyparser koa-multer --save `
100
+ ` npm install koa koa-router koa-bodyparser koa-multer `
101
101
102
102
Optionally you can also install their typings :
103
103
104
- ` npm install @types/koa @types/koa-router @types/koa-bodyparser --save `
104
+ ` npm install -D @types/koa @types/koa-router @types/koa-bodyparser `
105
105
106
- 4. Its important to set these options in ` tsconfig.json ` file of your project :
106
+ 4. Install peer dependencies :
107
+
108
+ ` npm install class-transformer class-validator `
109
+
110
+ In prior versions , these were direct dependencies , but now they are peer dependencies so you can choose when to upgrade and accept breaking changes .
111
+
112
+ 5. Its important to set these options in ` tsconfig.json ` file of your project :
107
113
108
114
` ` ` json
109
115
{
0 commit comments