Install - Woz-U-Group-Projects/team-glampfire-trail-mix GitHub Wiki

Install

Checkout from GitHub:

SSH

git clone [email protected]:Woz-U-Group-Projects/team-glampfire-trail-mix.git

HTTPS

git clone https://github.com/Woz-U-Group-Projects/team-glampfire-trail-mix.git

After cloning, go into the main project folder:

cd team-glampfire-trail-mix

Backend

From the main project folder, change into the backend folder:

cd server-java-mongodb

Copy the application.properties.dist file:

cp src/main/resources/application.properties.dist src/main/resources/application.properties

Edit the MongoDB part of the file appropriately.

MongoDB Community Edition

Nothing has to be done. The backend will connect to the server on the local machine using the test database. However, especially for security reasons, you may want to set things up differently.

MongoDB Atlas

Uncomment the spring.data.mongodb.uri line and paste in your connection string.

Development / Testing

Execute the backend server as:

mvn spring-boot:run

WAR File

Use the following command:

mvn clean install

This will put the WAR file in the target folder. Use the pom.xml file to change the name of the generated file.


Frontend

From the main project folder, change into the frontend folder:

cd client-angular

Next, install the node packages:

npm install

Copy the environments dist files:

cp src/environments/environment.ts.dist src/environments/environment.ts
cp src/environments/environment.prod.ts.dist src/environments/environment.prod.ts

Both files are setup for development/testing on the local machine. Change them to point to the actual development/testing backend server and the production backend server.

Development / Testing - local

Execute the following command:

ng serve --open

Keep it running and it will auto-build when the files are saved during development.

Development / Testing - server

Execute the following command:

ng build

The generated files will be in the dist/client folder. Just copy them to the server.

Production

Execute the following command:

ng build --prod

The generated files will be in the dist/client folder. Just copy them to the server.