A simple betting game on cardano blockchain
-
Install PostgreSQL and create a dedicated user and database for development.
-
Create the policy directory that will be used to store policy related files for minting ticket-nfts.
mkdir -p $HOME/.luckyfive/policy -
Create the payment directory to store payment key-pair used for the betting module.
mkdir -p $HOME/.luckyfive/payment -
Clone the repository.
git clone https://github.com/riidatibula/lucky-five.git -
Create a json config file.
sudo touch /etc/luckyfive-config.json; sudo -e /etc/luckyfive-config.jsonEnter the your actual development configuration:
{ "DEBUG": true, "SECRET_KEY": "xxxxxxxx-secret-key-xxxxxxxx", "LUCKYFIVE_API_KEY": "xxxxxxxx-api-xxxxxxxx", "ALLOWED_HOSTS": [], "DB_NAME": "luckyfive", "DB_USER": "luckyfivedb", "DB_PASSWORD": "mystrongpassword", "DB_HOST": "localhost", "POLICY_DIR": "$HOME/.luckyfive/policy/", "PAYMENT_SKEY": "$HOME/.luckyfive/payment/payment.skey", "PAYMENT_VKEY": "$HOME/.luckyfive/payment/payment.vkey" } -
Create a virtual environment under the cloned project.
cd <project-directory>; python3 -m virtualenv .venv -
Activate virtualenv.
source .venv/bin/active -
Install dependencies.
pip -r install requirements.txt -
Run project. The default local development url is at localhost:8000.
python src/manage.py runserver