Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ COPY . .

EXPOSE 80

RUN go mod init v1 && \
go mod download && \
RUN go mod download && \
go mod vendor && \
go build -v && \
rm -rf vendor && \
mv v1 server
mv golang-user-microservice server

CMD [ "./server" ]
CMD [ "./server" ]
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ Enable go modules and go dep integration.

## Running the server

Run the following commands using go modules:

go mod init v1
go mod download
go mod vendor

This creates a `go.mod` in the root directory.

Then run:

go run main.go


Expand Down
11 changes: 11 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/jamesmawm/golang-user-microservice

go 1.15

require (
github.com/google/uuid v1.1.2
github.com/gorilla/mux v1.8.0
github.com/jinzhu/gorm v1.9.16
github.com/rs/cors v1.7.0
github.com/spf13/viper v1.7.1
)
Loading