new endpoint

This commit is contained in:
haraldnilsen 2024-01-12 22:23:33 +01:00
parent 2f7536310c
commit bf9334ed1f
3 changed files with 7 additions and 1 deletions

View file

@ -19,4 +19,4 @@ RUN go build -o main ./cmd
EXPOSE 8080
# Command to run the executable
CMD ["./main"]
CMD ["./cmd/main"]

View file

@ -37,6 +37,10 @@ type Evaluation struct {
func main() {
router := gin.Default()
router.Use(cors.Default())
router.GET("/hello", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"hello":"world"})
})
// Info about user
router.POST("/submituserform", func(c *gin.Context) {

View file

@ -15,6 +15,8 @@ services:
build:
context: .
dockerfile: Dockerfile
ports:
- 8000:8000
image: helseveileder
depends_on:
- postgres