-
Notifications
You must be signed in to change notification settings - Fork 49
Getting Started Dev
We recommend the following tools to develop.
- 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://localhost:3001/' # the ip and the port of api of our backend SOCKET_URL='http://localhost:3002/' # the ip and the port of the socket in our backend # Frontend Host FRONTEND_HOST='http://localhost:3000' # 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:
# ---------------------- MONGODB ----------------------------
MONGO_URI=mongodb://root:asdasd@localhost # the db connection string
MONGO_DBNAME=backend # the name of our mongodb
# -------------------- APP SETTINGS -------------------------
APP_BACKEND_PORT=3001 # the port of our backend
APP_SOCKET_PORT= # the port of our socket - If you want the Socket to run on the same Port (which is required by some providers like Heroku), just leave this empty>
APP_JOINCODE_LENGTH=8 # the length of the join-codes
- 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