I want to only have swagger in development environment but I want to disable this link or disable swagger when deploy on production. How can I do it?
Asked
Active
Viewed 267 times
1 Answers
0
Check the NPM docs for install
"With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies."
"The --only={prod[uction]|dev[elopment]} argument will cause either only devDependencies or only non-devDependencies to be installed regardless of the NODE_ENV."
to install package for dev only :-
npm install swagger --only=dev

Ahmed farag mostafa
- 2,802
- 2
- 14
- 33
-
well, you're save me. Thanks you – haidn Jun 17 '16 at 03:10