Skip to content

dotkom/voting-backend

This branch is 20 commits ahead of, 6 commits behind Organisasjonskollegiet/voting-backend:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8f3aec6 · Oct 12, 2024
Oct 12, 2024
Mar 31, 2021
Oct 12, 2024
Oct 12, 2024
Mar 31, 2021
Mar 22, 2021
Oct 2, 2024
Mar 23, 2021
Mar 22, 2021
Oct 8, 2024
Oct 8, 2024
Oct 12, 2024
Apr 27, 2021
Oct 12, 2024
Mar 23, 2021
Oct 2, 2024
Oct 12, 2024

Repository files navigation

Doppler

doppler setup project voting-backend and environment dev

Running locally

doppler run -- yarn run dev

Running in docker

docker build -t voting/prod/backend . doppler run -- docker run -p 4000:4000 voting/prod/backend:latest

Starting

To quickly start the server in mockmode run:

docker run -e MOCKING=true -p 4000:4000 voting-backend

This is a version of the API which uses casual for mocking. The data wont actually come from a database, but its nice for frontend developers to chill

To run up a postgres database in a docker container which can be used locally and is compatible with .env.local

docker run --name votingdb -p 5432:5432 -e POSTGRES_PASSWORD=votingsecret -e POSTGRES_DB=votingdb -d postgres

Relevant scripts

yarn generate

After making updates to the prisma schema, running this command will generate a migration.

npx migrate dev

Migrate new updates of the prisma schema to the local database.

npx prisma studio

Lets you see and edit the content of the database.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Other 1.0%