✨ new endpoint
This commit is contained in:
parent
2f7536310c
commit
bf9334ed1f
3 changed files with 7 additions and 1 deletions
|
@ -19,4 +19,4 @@ RUN go build -o main ./cmd
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
# Command to run the executable
|
# Command to run the executable
|
||||||
CMD ["./main"]
|
CMD ["./cmd/main"]
|
||||||
|
|
|
@ -38,6 +38,10 @@ func main() {
|
||||||
router := gin.Default()
|
router := gin.Default()
|
||||||
router.Use(cors.Default())
|
router.Use(cors.Default())
|
||||||
|
|
||||||
|
router.GET("/hello", func(c *gin.Context) {
|
||||||
|
c.JSON(http.StatusOK, gin.H{"hello":"world"})
|
||||||
|
})
|
||||||
|
|
||||||
// Info about user
|
// Info about user
|
||||||
router.POST("/submituserform", func(c *gin.Context) {
|
router.POST("/submituserform", func(c *gin.Context) {
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ services:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
image: helseveileder
|
image: helseveileder
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
|
|
Reference in a new issue