Skip to content

Commit

Permalink
Update http mini project
Browse files Browse the repository at this point in the history
  • Loading branch information
naeemaei committed Oct 7, 2023
1 parent 4cbce71 commit 836b876
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions 17-Http/07-MiniProject/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine as builder
FROM golang:1.19-buster as builder

WORKDIR /app

Expand All @@ -10,5 +10,5 @@ COPY . ./
RUN go build -v -o server

COPY ./ ./app/server
EXPOSE 80

CMD ["/app/server"]
2 changes: 1 addition & 1 deletion 17-Http/07-MiniProject/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module http-mini-project

go 1.18
go 1.19
2 changes: 1 addition & 1 deletion 17-Http/07-MiniProject/management/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func Run() {
mux := http.NewServeMux()
mux.Handle("/movies/", &handlers.MovieHandler{})
server := &http.Server{
Addr: ":8080",
Addr: ":8085",
ReadTimeout: time.Second * 10,
WriteTimeout: time.Second * 10,
Handler: mux,
Expand Down

0 comments on commit 836b876

Please sign in to comment.