Update instructions

This commit is contained in:
Prathamesh Musale 2024-07-17 12:32:14 +05:30
parent 08c94f895e
commit f06792a946
3 changed files with 26 additions and 4 deletions

View File

@ -1 +1,21 @@
# laconic-testnet-faucet # laconic-faucet
* Install dependencies and build:
```bash
yarn && yarn build
```
* Set the private key of a funded faucet account as `faucetKey` in the [config file](./environments/local.toml)
* Run the faucet:
```bash
yarn start-faucet
# Expected output:
# Config:
# ...
# Faucet server running on port <port>
# Using DB directory '/path/to/faucet/data/db'
```

View File

@ -6,6 +6,7 @@
faucetKey = "" faucetKey = ""
[server] [server]
port = 3000
transferAmount = 1000000 transferAmount = 1000000
dailyLimit = 3000000 dailyLimit = 3000000
dbDir = "db" dbDir = "db"

View File

@ -21,6 +21,7 @@ interface Config {
faucetKey: string faucetKey: string
}, },
server: { server: {
port: number
transferAmount: string transferAmount: string
dailyLimit: string dailyLimit: string
dbDir: string dbDir: string
@ -70,9 +71,9 @@ async function main (): Promise<void> {
} }
}); });
const PORT = process.env.PORT || 3000; const port = config.server.port;
app.listen(PORT, () => { app.listen(port, () => {
console.log(`Faucet server running on port ${PORT}`); console.log(`Faucet server running on port ${port}`);
}); });
} }