This project is a continous build of the internal web page specifically developed for Singsaker Studenterhjem.
This project is a continous build of the internal web page specifically developed for Singsaker Studenterhjem. The web page includes functionality for assigning work shifts, doing room distibution, administrating seniority, and much more.
These instructions will give you a copy of the project up and running on
your local machine for development and testing purposes. See deployment
for notes on deploying the project on a live system.
Requirements for the software and other tools to build, test and push
A step by step series of examples that tell you how to get a development
environment running
Clone the repository to your local machine
git clone https://github.com/singsaker/intern.git
Install dependencies for both frontend (.intern/frontend) and backend (.intern/backend)
npm install
Create .intern/backend/.env
APP_SECRET={SECRET PASSWORD}
DATABASE_URL="mysql://USERNAME:PASSWORD@URL:PORT/DATABASE"
ENVIORNMENT="dev"
DB_ENV="testing"
Initiate prisma (from .intern/backend)
npx prisma init
Introspect database
npx prisma db pull
Generate prisma client
npx prisma generate
Run in developement mode
For both backend and frontend
npm run dev
localhost:3000 is the URL for the frontpage and localhost:4000 is a URL for doing backend calls in GraphQL.
Test backend by opening localhost:4000 and run the following
query {
hentBeboere {
id
fornavn
etternavn
}
}