Located in the /docs directory. *.json file is used for rendering, *.yaml is the original specification used in swagger UI.
Also published on GitHub pages: https://catbytes-community.github.io/webplatform-backend/
Located in the /docs/how-tos directory. All important information on local run, deployments, etc is stored there.
⚠️ For simple local run (no breaking changes) you can connect to the remote (DEV) database.
To do that, you have to authenticate with AWS CLI first (ref. /docs/how-tos/local_run_and_configs.md)
🚨 For proper development it is strongly recommended to use local database. Here's how to do that:
- Follow
/docs/how-tos/setup_local_postgresql, step "Setting up Local PostgreSQL instance" - Use
.env.localfile for environment variables (default.envis picked up by Docker so to avoid confusion we use explicit local file for local development). Update your.env.localaccordingly. Here is sample structure or reach out for up-to-date .env to fellow devs:
DB_USER=marina_kim
DB_HOST=localhost
DB_NAME=mydatabase
DB_PASS=password
DB_PORT=5432
ENVIRONMENT=local # the IMPORTANT part!!! this tells the service to use local resources.
✅ Once you are authenticated with AWS CLI or you have the local PostgreSQL setup, you can successfully run
npm startor
nodemon server.jsto start the server.
Refer to the Makefile to see commands frequently used in development.
Example usage:
make connect-devThis will execute the connect-dev command and connect you to the dev EC2 instance.
Make sure you have all required environment variables set.
Run
make helpto list all available Makefile commands.