Skip to content

Commit 6709ff5

Browse files
committed
update doc
1 parent c619207 commit 6709ff5

5 files changed

+42
-4
lines changed

config.release.toml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ file_dir = "/data"
55
## Access-Control-Allow-Origin: $ORIGIN
66
## Access-Control-Allow-Methods: OPTION,GET,HEAD
77
## Access-Control-Max-Age: 3600
8+
## If you put the server behind HTTPS proxy, please enable it
89
cors = false
910
## http bind, if set port <= 0 or remove http, will disable http server(need set https config)
1011
[http]

docs/develop/roadmap.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
- bench: add benchmark
66
- admin server support HTTPS
7-
- openTelemetry
7+
- ~~openTelemetry~~

docs/guide/spa-client-npm-package.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,44 @@
55
```shell
66
npm install --save-dev spa-client
77
```
8-
there has more info at [getting started](./getting-started.md#run-spa-client-in-npm-package)
8+
9+
Use with `.env` and vars, we would run the following command:
10+
```shell
11+
npm install --save-dev dotenv-cli cross-var spa-client
12+
```
13+
the `pachage.json` would like:
14+
```json
15+
{
16+
"scripts": {
17+
"upload": "dotenv cross-var spa-client upload ./build %DOMAIN%",
18+
"release": "dotenv cross-var spa-client release %DOMAIN%",
19+
"deploy": "npm run build && npm run upload && npm run release"
20+
}
21+
}
22+
23+
```
24+
the `.env` would be like:
25+
```angular2html
26+
# all config start with `SPA` for spa-client
27+
SPA_SERVER_ADDRESS=http://127.0.0.1:9000
28+
29+
# spa server token
30+
SPA_SERVER_AUTH_TOKEN=token
31+
32+
# default is 3
33+
SPA_UPLOAD_PARALLEL=3
34+
35+
#DOMAIN=www.example.com/a
36+
DOMAIN=www.example.com
37+
```
38+
39+
There has more info at [getting started](./getting-started.md#run-spa-client-in-npm-package)
940

1041
There id an example project for npm package users, you can view the package.json:
1142
[js-app-example](https://github.com/fornetcode/spa-server/tree/master/example/js-app-example).
1243

44+
45+
1346
## Build Source Code
1447

1548
```shell

docs/guide/spa-server-configuration.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The config format toml.
66

7-
The config default path is './config.conf', you can change it by environment `SPA_CONFIG`.
7+
The config default path is `./config.toml`, you can change it by environment `SPA_CONFIG`.
88

99
## Config Reference
1010

@@ -18,6 +18,7 @@ file_dir = "/data"
1818
## Access-Control-Allow-Origin: $ORIGIN
1919
## Access-Control-Allow-Methods: OPTION,GET,HEAD
2020
## Access-Control-Max-Age: 3600
21+
## If you put the server behind HTTPS proxy, please enable it
2122
cors = false
2223
## http bind, if set port <= 0 or remove http, will disable http server(need set https config)
2324
[http]

docs/guide/spa-server-release-package.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# spa-server distribution package
22
## Docker Image
3-
The docker image is distributed at `Github Packages` as `ghcr.io/fornetcode/spa-server`.
3+
The docker image is distributed at `Github Packages` as [`ghcr.io/fornetcode/spa-server`](https://github.com/fornetcode/spa-server/pkgs/container/spa-server).
44

5+
```shell
6+
docker pull ghcr.io/fornetcode/spa-server:latest
7+
```
58
## From Code
69
There no plan to release binary package. You can `git clone` the code and build yourself.
710

0 commit comments

Comments
 (0)