Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 2.25 KB

README.md

File metadata and controls

64 lines (40 loc) · 2.25 KB

Decentraland

# Decentraland Snap

The first Play-2-Earn photography game in Decentraland. Find a quest of your interest and take the best picture you can, then submit it and wait 24hrs to see if you won.

preview

Setup

Use Node.js version 12

environment setup

create a copy of .env.example and name it as .env.development

  cp .env.example .env.development

to know more about this file see the documentation

if you are running this project locally you only need to check the following environment variables:

  • CONNECTION_STRING: make sure it is point to a valid database
  • COMMITTEE_ADDRESSES: list of eth addresses separated by , that will be able to enact finished proposals

database setup

once you have a CONNECTION_STRING you can setup you database tables using the following command

npm run migrate up

Run

once you setup this project you can start it using the following command

  npm start

Note 1: this project run over https, if it is your first time you might need to run it with sudo

Note 2: you can disabled https removing the --https flag in the develop script of your package.json

back and front ends

this project runs gatsby as front-end and a nodejs server as back-end both connected through a proxy

routes

front-end routes are defined using gatsby routes + gatsby-plugin-intl, you can find each page in the src/pages directory

back-end routes are defined using express you can find each route in src/entities/{Entity}/routes.ts and those are imported ar src/server.ts