Running your own Denotarius backend
Installation
Let's first clone the source code and compile the code.
# clone the source code
git clone https://github.com/denotarius/denotarius-api
# enter nix-shell if nix is installed
command -v nix-shell
# build the code
yarn build
Configuration
The configuration should be located in the config/
folder (opens in a new tab). There are few examples
in the original repository, but basically it is:
config/default.json
{
"server": {
"port": 3000,
"debug": false,
"prometheusMetrics": false
},
"db": {
"connectionString": "postgresql://localhost/postgres",
"maxConnections": 2,
"connectionTimeoutMs": 3000,
"idleTimeoutMs": 10000,
"ssl": false
},
"blockfrost": {
"apiKey": "testnetD3t6mMoXwpxtRA3xdVZY93XvP0JPdSTiH",
"ipfsKey": "ipfsqwMez5XOuDzzio6ZQxkpSjApKe4RpAwfi"
},
"amountToPayInLovelaces": 100000000,
"mnemonic": "all all all all all all all all all all all all",
"metadataLabel": 69
}
Running
After you have the configuration file ready, you can run it as following.
$ yarn start
[17:27:05 UTC] INFO (603432): Server listening at http://0.0.0.0:3010
Docker
We are also hosting the source code as Docker images on Docker Hub (opens in a new tab).
docker run -i -p 3010 \
-t denotarius/denotarius-api:latest \
-v $PWD/config:/config
Last updated on January 27, 2023