EasyCloud is a simple file cloud platform with separate front-end and back-end. It supports uploading and managing files, online previewing of pictures and generating sharing links.
The following examples run two ways.
backend /server
/src/resources/db.properties
configure MySQL database connection information/src/resoutces/app/easycloud.properties
Modify App configuration (not required) frontend /web
npm install
module.exports: dev.proxyTable.target
in config/index.js
to be the server addressnpm run dev
1. Modify configuration (same as above)
You can also add a path to the production environment configuration file in
/src/resoutces/spring/spring-mybatis.xml
andsrc/main/java/com/pdwu/easycloud/common/config/AppConfig.java
2. Packing
mvn clean package
to generate the war package.npm run build
to generate static files in the dist directory.3. Server deployment
localhost:8080/easycloud
Path: /var/lib/tomcat/webapps/easycloud
/dist
directory to any path, such as: /home/myApps/easycloud_web
4.Nginx configuration
Backend configuration /etc/nginx/conf.d/easycloud.conf
server {
listen 9001;
server_name localhost;
root /var/lib/tomcat/webapps/easycloud;
location / {
proxy_pass http://localhost:8080/easycloud/;
}
}
Front-end configuration /etc/nginx/conf.d/easycloud_web.conf
server {
listen 80;
server_name localhost;
location / {
root /home/myApps/easycloud_web;
index index.html;
try_files $uri $uri/ /index.html;
}
location /imgs {
alias /home/myApps/easycloud_web/imgs;
}
location /api {
proxy_pass http://localhost:8080/easycloud/api;
}
}
Note: The above is a demonstration of server deployment in the context of Tomcat. Deployment in the root directory needs to be changed accordingly.