-
Notifications
You must be signed in to change notification settings - Fork 53
Getting Started Dev
We recommend the following tools to develop.
- Clone the repo
git clone https://github.com/BuchholzTim/Whitebird.git.
-
Navigate to the
dockerfolder in the project. There are two folderswhitebird_devandwhitebird_prod. For development we only need thewhitebird_dev. For development purposes we only need a running MongoDB. -
In the
whitebird_devfolder 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 -dto run the MongoDB. -
Our project structure is parted in two folders
frontendandbackend.
-
Navigate to the frontend folder
cd frontend. -
Install the dependencies with
yarn install. -
Copy
.env.bakto.envin 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.bakto.envin 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 useyarnas it produces a cleaner output and generally seems to be faster thannpm. Though, if you decide to go withnpmyou might need to change some things regarding theDockerfiles, which we won't cover here.
required:
recommended:
- Env -> Highlighting .env-Files