add example create user and change user tier commands

This commit is contained in:
Bryan Stitt 2022-11-22 06:02:59 +00:00
parent aeb6eac840
commit cf7239aa0b

View File

@ -70,13 +70,30 @@ $ websocat ws://127.0.0.1:8544
You can copy `config/example.toml` to `config/production-$CHAINNAME.toml` and then run `docker-compose up --build -d` start proxies for many chains.
### Run migrations
This is only really useful during development. The migrations run on application start.
Run migrations (useful during development. in production, the migrations run on application start)
```
cd migration
cargo run up
```
### Create a user:
```
web3_proxy_cli --db-url ... create_user --address 0x0000000000000000000000000000000000000000 --email infra@llamanodes.com --description "..."
```
### Give a user unlimited requests per second:
Copy the ULID key (or UUID key) out of the above command, and put it into the following command.
```
web3_proxy_cli --db-url ... change_user_tier_by_key "$RPC_ULID_KEY_FROM_PREV_COMMAND" "Unlimited"
```
## Database entities
This command only needs to be run during development. Production should use the already generated entities.