According to the project construction and related environment configuration
Recently, the software engineering class is coming to an end, and the big homework is to do a document management system, so I picked up Ruoyi again, and I was going to do it briefly. It turned out that there was a problem with the previous node environment, so I simply reinstalled and configured one.
Node, js download and environment configuration
- First download and install the
official website: link: link
The current version is more than 18, but I do not recommend using the new version, there will be many bugs, I have encountered it during installation, the modification method provided does not work, simply delete it , version 16 installed. - The installation path of my node.js is **E:\Program Files\nodejs
First create two folders under the installation directory, named node_cache, and node_global.
Open the command line window in nodejs, and enter the command:
// npm config set prefix "E:\Program Files\nodejs\node_global"
//npm config set cache "E:\Program Files\nodejs\node_cache"
Open the environment variable window to set
what is an environment variable and why should it be configured? Here's another blog post:
Add link description
- User variable setting
Edit the path of the user variable, and change the default APPData/Roaming\npm under the C drive to E:\Program Files\nodejs\node_global
- System variable setting
Create a new variable name in the system variable: NODE_PATH, variable value: E:\Program Files\nodejs\node_global\node_modules
and save it.
Enter node -v and npm -v respectively to view the version number
download redis
If you need to use Redis in the separate version, I used version 3.2 because I had it before.
Official website link: link
After downloading and decompressing: run the .exe file
download zoe
- Ruoyi official website: link: link
I downloaded the front-end and back-end separation version
After decompression:
I use IDEA for the compiler, drag the RuoYi-Vue-master folder to IDEA to open it. - After opening with IDEA, you need to configure the database. I use MySQL, open the application-druid.yml configuration file, and
modify the database name and password:
- Start the backend: Run RuoYiApplication
to start successfully:
- Start the front end:
You can also directly enter the npm run dev command in the ruoyi-ui folder.
The startup is successful:
if there is a 500 error, there is a problem with the database connection. I have encountered:
- MySQL service is not started
- There is an error in the application-druid.yml configuration file
If you come here, it will start successfully.