When using npm to download dependencies, because you download content from foreign websites, you may often experience instability, so you need to download cnpm代## npm is replaced by cnpm instead of npm, cnpm is made by domestic Taobao, in China Stable to use.
1. Install cnpm
npm install cnpm -g --registry=[https://registry.npm.taobao.org](https://registry.npm.taobao.org/)
2. Create express project
express demo
(Demo-project name)- Execute after entering the project folder
cnpm install
, install the dependent packages needed by the project
3. Install cross-domain module: cors
cnpm install cors
4. Install the mysql module
cnpm install mysql
5. Start the project
cnpm install mysql
Test whether the startup is successful
http://localhost:3000