-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from neuefische/20-implement-backend-and-front…
…end-logging 20 implement backend and frontend logging
- Loading branch information
Showing
17 changed files
with
302 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,76 @@ | ||
# hh-java-24-2-teamproject-2 | ||
# hh-java-24-2-teamproject-2 | ||
|
||
## Introduction | ||
RestaurantApp is an application for managing and organizing restaurant details. Users can save their favorite restaurants information. | ||
|
||
## Prerequisites | ||
|
||
The following technologies should be installed on the system: | ||
|
||
- Java SDK version 22 | ||
- Node.js | ||
- NPM (Node Package Manager) | ||
- optional: IntelliJ IDEA Ultimate Edition | ||
|
||
## Dependencies | ||
|
||
### Backend | ||
- spring-boot-starter-data-mongodb | ||
- spring-boot-starter-parent Version 3.3.0 | ||
- spring-boot-starter-web | ||
- spring-boot-starter-validation | ||
- logback-logtail Version 0.3.4 from com.logtail | ||
- de.flapdoodle.embed.mongo.spring3x Version 4.13.0 from de.flapdoodle.embed (only Test-Scope) | ||
- spring-boot-starter-test (only Test-Scope) | ||
- spring-boot-starter-actuator | ||
|
||
### Frontend | ||
|
||
- TypeScript | ||
- React | ||
- Jest | ||
- Babel | ||
- Axios | ||
- Test-Library/React | ||
- Styled-Components | ||
- ESLint | ||
|
||
## Getting Started | ||
|
||
Follow these steps to get the project up and running on your local machine: | ||
|
||
1. Clone the repository: | ||
`git clone https://github.com/neuefische/hh-java-24-2-teamproject-2.git` | ||
|
||
2. Navigate to the project's root directory: | ||
`cd hh-java-24-2-teamproject-2/` | ||
|
||
3. Setup all environment variables | ||
1. Backend: Copy application-development-properties.sample to application-development-properties and replace with your secrets: | ||
`cp backend/src/main/resources/application-development.properties.sample backend/src/main/resources/application-development.properties` | ||
2. Frontend: Copy .env.local.sample to .env.local and replace with your secrets: | ||
`cp frontend/.env.local.sample frontend/.env.local ` | ||
|
||
4. Navigate to the frontend's root directory: | ||
`cd frontend/` | ||
|
||
5. Install the NPM dependencies: | ||
`npm install` | ||
|
||
6. Start the project: | ||
For IntelliJ IDEA the configuration for all runs should be automatically loaded using the files in `.run/` folder. | ||
- For the backend, you might want to execute the main Spring Boot Application class. | ||
- For the frontend, typically you would use `npm dev`. | ||
|
||
## Running Tests | ||
For IntelliJ IDEA the configuration for all test runs should be automatically loaded using the files in `.run/` folder. | ||
- For the backend, you might want to execute the test folder. | ||
- For the frontend, typically you would use `npm test`. | ||
|
||
## Authors / Acknowledgments | ||
- [Samuel Gesang](https://github.com/gcode-de) | ||
- [Jonas Honecker](https://github.com/jonashonecker) | ||
- [Daniel Pohl](https://github.com/daniel-pohl) | ||
- [Aljoscha Zöller](https://github.com/josch87) | ||
|
||
[See all git contributors](https://github.com/neuefische/hh-java-24-2-teamproject-2/graphs/contributors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
backend/src/main/resources/application-development.properties.sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Database Configuration | ||
MONGODB_URI=your_db_uri | ||
MONGODB_URI=your_db_uri | ||
|
||
# Logging Configuration | ||
BETTERSTACK_TOKEN=your_betterstack_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
spring.application.name=backend | ||
|
||
# Database | ||
spring.data.mongodb.uri=${MONGODB_URI} | ||
spring.data.mongodb.database=restaurantApp | ||
spring.data.mongodb.database=restaurantApp | ||
|
||
# Logging | ||
logging.level.com.neuefische.team2.backend=info | ||
management.endpoints.web.exposure.include=loggers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<springProperty scope="context" name="betterStackToken" source="BETTERSTACK_TOKEN"/> | ||
<appender name="Logtail" class="com.logtail.logback.LogtailAppender"> | ||
<appName>RestaurantApp Backend</appName> | ||
<sourceToken>${betterStackToken}</sourceToken> | ||
<mdcFields>requestId,requestTime</mdcFields> | ||
<mdcTypes>string,int</mdcTypes> | ||
</appender> | ||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="Logtail" /> | ||
<appender-ref ref="Console" /> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Logging | ||
VITE_BETTERSTACK_TOKEN=your_betterstack_token |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.