base of backend
All checks were successful
deploy to production / deploy-frontend (push) Successful in 24s
Build and test FrontEnd / Build (push) Successful in 22s
Build and test FrontEnd / Test (push) Successful in 22s

Co-authored-by: Debucquoy <debucqquoy.anthony@gmail.com>
Reviewed-on: #29
Co-authored-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
Co-committed-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
2024-02-23 12:00:36 +01:00
committed by Debucquoy Anthony
parent b9fec5e7b4
commit fb6527afd5
18 changed files with 610 additions and 0 deletions

37
backend/.gitignore vendored Normal file
View File

@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/

39
backend/build.gradle.kts Normal file
View File

@ -0,0 +1,39 @@
plugins {
java
id("org.springframework.boot") version "3.2.2"
id("io.spring.dependency-management") version "1.1.4"
}
group = "ovh.herisson"
version = "0.0.1-SNAPSHOT"
java {
sourceCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
// implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-starter-web")
// implementation("org.springframework.session:spring-session-jdbc")
developmentOnly("org.springframework.boot:spring-boot-devtools")
// developmentOnly("org.springframework.boot:spring-boot-docker-compose")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test")
// testImplementation("org.springframework.boot:spring-boot-testcontainers")
// testImplementation("org.testcontainers:junit-jupiter")
// testImplementation("org.testcontainers:postgresql")
}
tasks.register("run") {
dependsOn(tasks.bootRun)
}
tasks.withType<Test> {
useJUnitPlatform()
}

9
backend/compose.yaml Normal file
View File

@ -0,0 +1,9 @@
services:
postgres:
image: 'postgres:latest'
environment:
- 'POSTGRES_DB=mydatabase'
- 'POSTGRES_PASSWORD=secret'
- 'POSTGRES_USER=myuser'
ports:
- '5432'

View File

@ -0,0 +1,12 @@
package ovh.herisson.Clyde;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ClydeApplication {
public static void main(String[] args) {
SpringApplication.run(ClydeApplication.class, args);
}
}

View File

@ -0,0 +1,18 @@
package ovh.herisson.Clyde.EndPoints;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import ovh.herisson.Clyde.Ping;
@RestController
public class PingController {
@GetMapping("/ping")
public Ping ping(){
return new Ping(1, "test");
}
}

View File

@ -0,0 +1,3 @@
package ovh.herisson.Clyde;
public record Ping(int id, String txt){};

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,13 @@
package ovh.herisson.Clyde;
import org.junit.jupiter.api.Test;
// import org.springframework.boot.test.context.SpringBootTest;
// @SpringBootTest
class ClydeApplicationTests {
@Test
void contextLoads() {
}
}