同步操作将从 powerems/myems 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
MyEMS Web 用户界面,用于能源数据分析 Providing Web UI for MyEMS users to analysis energy data
Node.js
nginx-1.18.0 or later
This project is scaffolded using Create React App.
This will create an optimized production build by compililing, merging and minifying all the source files as necessary and put them in the build/ folder.
You can run 'node server.js' to run the production build locally at http://localhost:5000.
refer to http://nginx.org/en/docs/install.html
$ sudo nano /etc/nginx/nginx.conf
In the 'http' section, add some directives:
http{
client_header_timeout 600;
client_max_body_size 512M;
gzip on;
gzip_min_length 512;
gzip_proxied any;
gzip_types *;
gzip_vary on;
...
}
Add a new 'server' section with direstives as below:
server {
listen 80;
server_name myems-web;
location / {
root /var/www/html/web;
index index.html index.htm;
}
-- To avoid CORS issue, use Nginx to proxy myems-api to path /api
-- Add another location /api in 'server ', replace demo address http://127.0.0.1:8000/ with actual url
location /api {
proxy_pass http://127.0.0.1:8000/;
proxy_connect_timeout 75;
proxy_read_timeout 600;
send_timeout 600;
}
}
Restart NGINX
$ sudo systemctl restart nginx
$ cd ~
$ git clone https://github.com/MyEMS/myems.git
Install myems-web :
Check and change the config file if necessary:
$ cd ~/myems/web
$ sudo nano src/config.js
Build and Compress
$ sudo npm run build
$ tar czvf myems-web.tar.gz build
Install Upload the file myems-web.tar.gz to you web server. Note that the following path should be same as that was configured in nginx.conf.
$ tar xzf myems-web.tar.gz
$ sudo rm -r /var/www/html/web
$ sudo mv build /var/www/html/web
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。