Governance backend
This is a Node.js backend server for the governance dapp.
Architecture
The project is using the library TSOA, a Typescript upgrade of express server that includes support for dependency injection. It also includes TypeORM as the ORM library. Primarily it is designed for use with MySQL database.
Getting started (development)
- Clone this repo
git checkout https://github.com/flare-foundation/Governance-Backend.git
- Set up the database
- Set up configurations
- Install packages
yarn
- Run event collector process
yarn event-collector
- Run web server
yarn dev
- Use
governor-cli
tool to create proposals and submit votes. - Use swagger API at
http://localhost:9500/api-doc/
for testing.
If controllers (src/controllers
) are changed, regenerate API specifications by running
yarn routes
Deployment
To deploy the project on the Ubuntu server, see instructions