This repository has implementation of Whisper Chain backend APIs and cron processes, developed using Node.js.
-
Install Node.js - currently the latest LTS version is 18 and we encourage installing the same.
-
Set proper values of env vars mentioned in ./env_vars.sample file
-
Install and start MySQL. Create the user with the credentials mentioned in env vars, so that code can interact with the DB.
> mysql.server start
- Create the main db and create schema_migrations table using the following command.
> source set_env_vars.sh
> node db/seed.js
- Install required NPM dependencies
> rm -rf node_modules
> rm -rf package-lock.json
> npm install
- Running all pending migrations.
> source set_env_vars.sh
> node db/migrate.js
- Start the server
> npm start
TODO
- Generate OpenAPI Specs
> npm run generate-openapi-docs
- Detailed documentation can be found at /api-docs route.
- Take images from PX team, upload them inside the stability folder in the whisperchain-staging-static-files bucket and make them public.
- Create a new entry in the images table where url is S3 url from step 1 and ipfs_object_id field will be empty.
- Create a new entry in the platform_chain_seeds table where image_id field will be id of the images table from step 2 and is_published field will be 2.