The backend server is written in the Go programming language using a PostgreSQL database.
- Install Golang above 1.18 or above. https://go.dev/doc/install
- Install PostgreSQL 14.5 or above. https://www.postgresql.org/download/linux/ubuntu/
- Install Redis. https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/
To create database you should use built-in administrative account
su postgres
psql postgres
Create the user role and database:
CREATE ROLE your_username LOGIN PASSWORD 'your_password';
CREATE DATABASE your_dbname WITH OWNER = your_username;
If you need to provide a dump of the database schema, follow the steps below:
cd server
# Replace 'your_database_name' with the actual name of your PostgreSQL database
sudo -u postgres psql your_dbname < schema/schema.sql
- Add this in
update_denom_price.sql
file# Replace coin_minimal_denom with the actual minimal denom and replace coin_gecko_id with actual coin gecko id ('coin_minimal_denom', 'coin_gecko_id', true, NOW(), '{}'::jsonb)
- Run this command
# Replace your_database_name with the actual database name sudo -u postgres psql 'your_database_name' < schema/update_denom_price.sql
make sure you have done pre-requisites step
mv example.yaml config.yaml
replace the placeholders in the config.yaml file with your actual details, such as database connection strings and server ports.
go mod tidy
go run server.go