Merge branch 'develop'

pull/117/head
13621160019@163.com 2021-12-28 17:20:38 +08:00
commit ce242594c2
2 changed files with 10 additions and 6 deletions

12
web/README.md vendored
View File

@ -22,6 +22,10 @@ sudo ln -s /usr/local/lib/nodejs/node-vxx.x.x-linux-x64/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/nodejs/node-vxx.x.x-linux-x64/bin/npm /usr/bin/npm
sudo ln -s /usr/local/lib/nodejs/node-vxx.x.x-linux-x64/bin/npx /usr/bin/npx
```
Download Latest Current Version Windows Installer (.msi) 64-bit from https://nodejs.org/en/download/current/
Install Node.js with Setup Wizard
Test installation
```bash
node -v
@ -32,18 +36,18 @@ npx -v
* Download all the necessary dependencies into the node_modules directory.
```bash
cd myems/web
sudo npm i --unsafe-perm=true --allow-root --legacy-peer-deps
npm i --unsafe-perm=true --allow-root --legacy-peer-deps
```
* If you modified any scss files then you need to compile SCSS, else you can safely ignore this step.
Run below command in your project directory to compile scss.
```bash
sudo npm run scss
npm run scss
```
* Starting the Development Server
A local web server will start at http://localhost:3000.
We are using webpack and webpack-serve to automatically detect file changes. So, if you edit and save a file, your browser will automatically refresh and preview the change.
```
sudo npm start
npm start
```
## Installation
@ -79,7 +83,7 @@ docker build -t myems/myems-web .
```
* Run a Docker container
```bash
docker run -d -p 80:80 --restart always --name myems-web myems/myems-web
docker run -dp 80:80 --restart always --name myems-web myems/myems-web
```
-d Run container in background and print container ID

4
web/package.json vendored
View File

@ -77,8 +77,8 @@
"uuid": "^3.4.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy-provider build",
"eject": "react-scripts eject",
"scss": "gulp",
"analyze": "npx source-map-explorer 'build/static/js/*.js'"