Update instructions
This commit is contained in:
parent
08c94f895e
commit
f06792a946
22
README.md
22
README.md
@ -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'
|
||||||
|
```
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
faucetKey = ""
|
faucetKey = ""
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
|
port = 3000
|
||||||
transferAmount = 1000000
|
transferAmount = 1000000
|
||||||
dailyLimit = 3000000
|
dailyLimit = 3000000
|
||||||
dbDir = "db"
|
dbDir = "db"
|
||||||
|
@ -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}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user