Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 1.59 KB

mac-native.md

File metadata and controls

73 lines (51 loc) · 1.59 KB

← Back: Getting started

Installing on MacOS (Native)

Requirements

  • Homebrew
    • MacOS package manager
  • Poetry
    • Backend dependency manager
  • yarn
    • Frontend dependency manager
  • pyenv
    • Python version manager. Lets you easily install the same Python version that Samfundet4 expects.

Installing

First clone the Samfundet4 repository.

git clone git@github.com:Samfundet/Samfundet4.git

Install the frontend dependencies

cd Samfundet4/frontend
yarn

Install the backend dependencies

cd ../backend
poetry install

Then apply migrations and run seed script (the seed script adds test data to our database)

poetry run python3 manage.py migrate
poetry run python3 manage.py seed

Environment files

Both the backend and frontend directories have an .env.example file. In each directory, copy this file to .env and adjust any values as needed. You may for example want to change the default Django superuser username and password (DJANGO_SUPERUSER_USERNAME and DJANGO_SUPERUSER_USERNAME).

Running

Start backend:

cd backend
poetry run python3 manage.py runserver

Start frontend:

cd frontend
yarn start

Post-install

Now that you've got the project up and running, check out the post-install instructions: