snowballtools-base/packages/backend
Vivian Phung a4d9211ffe
Refactor(README.md) (#217)
This pull request refactors the main `README.md` by removing detailed backend and frontend setup instructions and adding separate `README.md` files for the backend and frontend with their specific setup and deployment instructions. This makes the main `README.md` cleaner and directs users to specific READMEs for backend and frontend setups.

---
2024-06-22 18:07:47 -04:00
..
environments ignore backend env file and readme 2024-02-26 17:33:44 -05:00
src bump: version (#213) 2024-06-21 21:16:34 -04:00
test Merge branch 'ng-check-deployment-removal-record' 2024-05-22 10:41:37 -04:00
.eslintignore Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
.eslintrc.json Merge branch 'main' of https://github.com/snowball-tools/snowballtools-base into andrehadianto/design-system-components 2024-02-22 12:45:17 +07:00
.gitignore ignore backend env file and readme 2024-02-26 17:33:44 -05:00
.node-version Switch from cra to vite 2024-04-11 21:48:58 -05:00
.prettierignore Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
.prettierrc.json Backend package with db models (#43) 2024-01-16 13:40:14 +05:30
package.json Support async express handlers 2024-06-19 22:59:20 -05:00
README.md Refactor(README.md) (#217) 2024-06-22 18:07:47 -04:00
tsconfig.json Backend package with db models (#43) 2024-01-16 13:40:14 +05:30

backend

This backend is a node.js express.js apollo server project in a yarn workspace.

Getting Started

Install dependencies

In the root of the project, run:

yarn

Build backend

yarn build --ignore-frontend

Environment variables

Local

Copy the envionments/local.toml.example file to envionments/local.toml:

cp envionments/local.toml.example envionments/local.toml

Staging environment variables

In the deployment repository, update staging staging/configmaps/config/prod.toml

Production environment variables

In the deployment repository, update production production/configmaps/config/prod.toml

Run development server

yarn start

Deployment

Clone the deployer repository:

git clone git@git.vdb.to:cerc-io/snowballtools-base-api-deployments.git

Staging

echo trigger >> .gitea/workflows/triggers/staging-deploy
git commit -a -m "Deploy v0.0.8"  # replace with version number
git push

Production

echo trigger >> .gitea/workflows/triggers/production-deploy
git commit -a -m "Deploy v0.0.8" # replace with version number
git push

Deployment status

Dumb for now

Update version number manually in routes/staging.ts