Upgrade to latest Seed, remove JS WebSocket, remove webpack dependency
This commit is contained in:
parent
39ee462e33
commit
282d9cc2d2
@ -124,7 +124,12 @@ cargo run --bin jirs_server
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
cd jirs_client
|
||||
yarn
|
||||
yarn webpack-dev-server
|
||||
./scripts/prod.sh
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo ln -s ./jirs.nginx /etc/nginx/sites-enabled/
|
||||
sudo nginx -s reload
|
||||
```
|
||||
|
||||
## Issue trackers
|
||||
|
@ -18,4 +18,12 @@ server {
|
||||
}
|
||||
|
||||
error_page 404 =200 /index.html;
|
||||
|
||||
location /ws/ {
|
||||
proxy_pass http://localhost;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
|
16
jirs-client/scripts/prod.sh
Executable file
16
jirs-client/scripts/prod.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. .env
|
||||
|
||||
rm -Rf tmp
|
||||
mkdir tmp
|
||||
|
||||
wasm-pack build --mode normal --release --out-name jirs --out-dir ./tmp --target web
|
||||
../target/debug/jirs-css -i ./js/styles.css -O ./tmp/styles.css
|
||||
|
||||
cat ./js/index.js \
|
||||
| sed -e "s/process.env.JIRS_SERVER_BIND/'$JIRS_SERVER_BIND'/g" \
|
||||
| sed -e "s/process.env.JIRS_SERVER_PORT/'$JIRS_SERVER_PORT'/g" &> ./tmp/index.js
|
||||
cp ./js/template.html ./tmp/index.html
|
||||
|
||||
cp -r ./dev/* ./tmp
|
Loading…
Reference in New Issue
Block a user