-
Notifications
You must be signed in to change notification settings - Fork 28
Get ready for development
Jan Stamer edited this page Jun 26, 2020
·
7 revisions
todo
Use whatever IDE you like, but please make sure you ..
- use the right file-encoding : UTF-8
- use our code formatter
- make sure git is installed :-)
- clone the repository (it contain both: frontend and backend application)
Prerequesits:
- npm installed on your local machine (https://www.npmjs.com/get-npm)
Starting the application:
- go to the /frontend directory
npm install
- ng serve
The application starts a webserver. Open localhost:4200 in your browser to see the application and expects the api top be available at localhost:8080.
- java jdk 11 installed
- lombok installed and setup in your IDE (https://projectlombok.org/)
- maven installed
- go to the /backend directory
- mvn spring-boot:run -P inmemory => this maven profile starts the application with a h2 inmemory DB, filled with testdata
The project does also contain a docker file for a postgres DB, which you can use alternatively to the h2 DB.
- make sure docker is installed correctly (https://www.docker.com/products/docker-desktop)
- open command shell an go to the project's /backend directory
- run
docker-compose up
- open another command shell
- get your container ID:
docker ps
- start the container:
docker exec -it <CONTAINER-ID> bash
- Execute Postgres as root:
su - postgres
- create a user for your DB:
createuser --interactive --pwprompt -s quarano-app
- define a password: quarano
- create databse: createdb -O quarano-app quarano
- create a local property file called "application-local.properties" in /backend/src/main/resources/
- File content:
spring.datasource.url=jdbc:postgresql://<IP-of-your-postgres-DB>:5432/quarano
spring.datasource.username=quarano-app
spring.datasource.password=quarano
`spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect``
- in you shell go to /backend directory
- run
mvn spring-boot:run