The project consists of two main (independent) modules:
-
You can collaborate on any of them independently by modifying only the module you would like to change.
-
Packing as a WAR file with the API server only
- You need Java 8 in order to generate the WAR and a servlet container (such as Apache Tomcat) in order to deploy it.
- From the location
server/
rungradle bootWar
.
-
API + Angular Client
- You need to have Node.js 10.9.0 or later, together with an npm package manager.
- Consider modifying the configuration file with the proper values according to your environment:
client/src/assets/config/config.dev.json
(when you're in development mode)client/src/assets/config/config.prod.json
(when you're in production mode)
- From the location
server/
rungradle bootWar -Pclient=true
. - Optionally you can modify other behaviors for the client app while generating the WAR using the following commands:
client
, use-Pclient=true
for generating the client Angular app.clientDoc
, use-PclientDoc=true
for generating the client app documentation.clientDependencies
, use-PclientDependencies=true
for (re)installing all node dependencies before creating the WAR. Use this options if it is the first time you create the WAR file. Once the dependencies have been installed this can be safely skipped next time.- An example of build with the first two parameters enabled to true would be
gradle bootWar -Pclient=true -PclientDoc=true
.
-
This will create a WAR file inside
server/build/libs
ready to be deployed. -
Database configuration
- Create a PostgreSQL database.
- Open the WAR file and set the proper connection parameters inside the file
WEB-INF/classes/config/application-production.properties
- Save the file and update it inside the WAR file.
- Deploy the WAR file.
Note: If you don't have Gradle installed, you can use the command ./gradlew
instead of gradle
for the previous mentioned steps.