-
Notifications
You must be signed in to change notification settings - Fork 49
Getting Started Dev
- Clone the repo
git clone https://github.com/BuchholzTim/Whitebird.git
.
-
Navigate to the
docker
folder in the project. There are two folderswhitebird_dev
andwhitebird_prod
. For development we only need thewhitebird_dev
. For development purposes we only need a running MongoDB. -
In the
whitebird_dev
folder you can find adocker-compose.yml
. You can customize the parameter in that file for your need or use the default values. -
To start the application just use
docker-compose up -d
to run the MongoDB. -
Our project structure is parted in two folders
frontend
andbackend
.
-
Navigate to the frontend folder
cd frontend
. -
Install the dependencies with
yarn install
. -
Copy
.env.bak
to.env
in the same folder and change its contents to match your configuration:# Backend Server Location API_URL='http://backend:3001/' # the ip and the port of api of our backend SOCKET_URL='http://backend:3002/' # the ip and the port of the socket in our backend # Frontend Host FRONTEND_HOST='http://localhost:40000' # the ip and the port needed for for the link shown to share a whiteboard
-
Run the frontend with
yarn dev
. -
The frontend is now reachable under http://localhost:3000
-
Install the dependencies with
yarn install
. -
Run the backend with
yarn start:dev
. -
Copy
.env.bak
to.env
in thesrc/config
-folder and change its contents to match your configuration:# ---------------------- MONGO DB --------------------------- mongo_uri=mongodb://root:asdasd@mongodb # the db connection string mongo_dbname=backend # the name of our mongodb # -------------------- APP SETTINGS ------------------------- app_backend_port=3001 # the port of our backend app_joincode_length=8 # the length of our joincodes
-
The API-Swagger documentation is now reachable under http://localhost:3001/api.
-
Yarn -> You can still use
npm
. But we decided to useyarn
as it produces a cleaner output and generally seems to be faster thannpm
. Though, if you decide to go withnpm
you might need to change some things regarding theDockerfiles
, which we won't cover here.
required:
recommended:
- Env -> Highlighting .env-Files