ExpressGateway / express-gateway

A microservices API Gateway built on top of Express.js
https://www.express-gateway.io
Apache License 2.0
2.97k stars 344 forks source link

"eg gateway create" uses Express Gateway last version, not current installed version #936

Closed mmadaria closed 4 years ago

mmadaria commented 5 years ago

When executing "eg gateway create" command, the app generates an instance of Express Gateway using the last stored version in the public NPM repositories, and doesn't use the same version of the local installed app.

For example, if the installed version of Express Gateway used is 1.16.3 and the "eg gateway create" command is executed, internally it will execute "npm install express-gateway" when generating a new instance, so it's not considering the current installed version (e.g. 1.16.3), and it will install a newer and different version (e.g. 1.16.7).

This logic can be found in "bin/generators/gateway/create.js" file:

install () { this.npmInstall(['express-gateway'], { save: true }); }

Note: when the instance is created, you can check the final installed version inside "package.json" file.

XVincentX commented 5 years ago

Good point. It should also be a very easy fix. Would you be interested in opening a PR for this?