Hello, studying node.js, I encountered some difficulties with this article . It seems that I started to understand everything, but in the section “Doing something useful - Express” I didn’t understand how to install the express module. cd /my/app/location
- what kind of directory should it be? As I understood, to install the module, you need to type the npm install express
command (this is understandable), but before that, I understood, you need to go to some directory ... Correct me and send in the right direction! Thanks in advance!
- Directory of your project. What is your axis? - alvoro
- The test file just posted on C: / Axis - Windows 7 - Deathdrumer
- create a directory somewhere, have you already set npm? - zb '
- You need to add the path to npm and node to the list of global environment variables and then install the express in the folder with the project. - Deadkenny
- Be so kind as to write please an example, how to add paths and how to install express! - Deathdrumer
3 answers
how to install plugins
npm i module_name
what ways to prescribe
The folder where your project files are located.
Create a hello folder in my documents. Make sure you have node.js, npm, and express-generator installed. Navigate, in the console, to the test folder and run express && npm i
in the console. Further in the text of the article that you found.
- It seems that it will never end: you install one, then it turns out that you need to install something else. I thought that nodejs is needed with which I will install express, but it turned out that some kind of express-generator is needed !!! What a maze! - Deathdrumer
express-generator
appeared with version 4. It is not mandatory, but for convenience, let it be. At the same time and globally install modules practice. Its appearance is caused by the fact that I understand that the core of the framework would be developed separately, and all middleware and other buns are separate. - alvoro- Guys, add me someone thread in Skype, login youbiznes Help someone finally! In gratitude, a couple of hundred will throw on the wallet. - Deathdrumer
- one@Deathdrumer, this is not a freelance exchange. What you can not do? Are there node and npm commands in the console? - alvoro
- 2Well, I told you - linux is easier. Unfortunately I will not help in Windows, I have not done anything with it except for demolition for 10 years already - zb '10
The article on the link in question is not the best option for a beginner.
I recommend this.
And in the Express at this stage of the study I recommend not to touch it at all. Do not touch yet. Return to it when you understand the basic processes.
If you have come to this page, and do not know how to install modules from manuals found on the Internet ... A little long explanation.
After installing the distribution under Windows from the official website, you need to check the result.
Go to the Windows command prompt. Search here:
Пуск - Все программы - Стандартные - Командная строка
Type in it:
node -v
Press enter. The result should be something like:
v4.1.2
Now dial
npm version
Click enter. Must see something like:
{ npm: '2.14.4', ares: '1.10.1-DEV', http_parser: '2.5.0', modules: '46', node: '4.1.2', openssl: '1.0.2d', uv: '1.7.5', v8: '4.5.103.35', zlib: '1.2.8' }
If it works for you. Doing this:
npm install express
You can put the express module on your computer.