An open API service indexing awesome lists of open source software.

https://github.com/mukulmantosh/go-gorilla-rest

Basic CRUD Operations using Gorilla/Mux and GORM
https://github.com/mukulmantosh/go-gorilla-rest

golang gorm-orm http rest-api

Last synced: 3 months ago
JSON representation

Basic CRUD Operations using Gorilla/Mux and GORM

Awesome Lists containing this project

README

        

# Golang Gorilla/Mux CRUD REST

![golang_icon](./misc/golang-1.svg)
In this application we are going to create CRUD endpoints using Gorilla/Mux and GORM.

## Installing Dependencies
```
go get -u github.com/gorilla/mux
go get -u gorm.io/gorm
go get -u gorm.io/driver/mysql
```

When you're creating the `user` package make sure to run the below command

```
god mod init user
god mod tidy
```

Run the below command in the root

```
go mod edit -replace user=./user
```

Once, you're done with all the changes.

Run the below command

```
go build
```

You will receive a binary file in your project root,
under the name `go-rest` in Windows `go-rest.exe`