11# Command Line
22
3- We have provided command line in 1.x versions, but it seems no one need it. So we removed the binary release and docker
4- release.
5-
6- But you can build it from source.
3+ We provided command line client for Linux, Mac and Windows, you can download it at [ Release Page] ( https://github.com/ForNetCode/spa-server/releases ) .
74
85## Source Code
96
@@ -20,13 +17,10 @@ cd client
2017cargo install --bin spa-client --path .
2118```
2219
23- ## Overview
24-
25- spa-client it a command line tool to help user upload files and release new SPA.
26-
2720## Usage Example
2821
2922There are some usage examples of ` spa-client ` , you also can get help by typing ` spa-client -h ` .
23+ The ` config file path ` could also set by environment variable: ` SPA_CLIENT_CONFIG ` .
3024
3125``` shell
3226# upload static files to admin server, if not set $OPT_VERSION, will try to
@@ -49,20 +43,9 @@ the config file format is toml:
4943
5044``` toml
5145[server ]
52- address = " http://127.0.0.1:9000"
53- auth_token = " token"
46+ address = " http://127.0.0.1:9000" # SPA_SERVER_ADDRESS
47+ auth_token = " token" # SPA_SERVER_AUTH_TOKEN
5448# [upload]
5549# # default value is:3
56- # parallel = 3
57- ```
58-
59- the config default file name is ` client.conf ` .
60-
61- We also provide http api to interact with admin server, the following command is ok to upload and serve new version.
62-
63- ``` shell
64- # Uploading Files By scp and release
65- scp $SPA_DIRECTORY \
66- user@ip:$( curl " http://$ADMIN_SERVER /upload/position?domain=$DOMAIN " -H " Authorization: Bearer $TOKEN " ) && \
67- curl " http://$ADMIN_SERVER /update_version?domain=$DOMAIN " -H " Authorization: Bearer $TOKEN "
50+ # parallel = 3 # SPA_UPLOAD_PARALLEL
6851```
0 commit comments