Reputation: 2549
I've a question regarding ExpressJS local installation (I'm aware of the global usage but it's not the case for me right now).
I've a the following project:
/my-project
|- package.json (express included)
|- node_modules (express installed)
|- app.js
now I can use expressJS within the app.js module but, how can I use it's CLI?
Upvotes: 1
Views: 2453
Reputation: 6668
You can still install the global version too. They will be installed in different locations.
Or you can invoke the local one in your directory -
./node_modules/express/bin/express
Edit: The above is not the case with latest versions. It is true in the one i have installed (3.4.8).
Seems in the latest version (4.0.0) they have separated the app generator from express core.
If you want to install the generator locally too, do
npm install express-generator
And then
./node_modules/express-generator/bin/express
Upvotes: 4