Skip to content

Files

Latest commit

Mar 11, 2023
946ea67 · Mar 11, 2023

History

History
This branch is 194 commits behind kataras/iris:main.

mongodb

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Jun 7, 2020
Mar 11, 2023
Feb 19, 2023
Jun 7, 2020

Build RESTful API with the official MongoDB Go Driver and Iris

Article is coming soon, follow and stay tuned

Read the fully functional example.

Run

Docker

Install Docker and execute the command below

$ docker-compose up

Manually

# .env file contents
PORT=8080
DSN=mongodb://localhost:27017
$ go run main.go
> 2019/01/28 05:17:59 Loading environment variables from file: .env
> 2019/01/28 05:17:59 ◽ Port=8080
> 2019/01/28 05:17:59 ◽ DSN=mongodb://localhost:27017
> Now listening on: http://localhost:8080
GET    :  http://localhost:8080/api/store/movies
POST   :  http://localhost:8080/api/store/movies
GET    :  http://localhost:8080/api/store/movies/{id}
PUT    :  http://localhost:8080/api/store/movies/{id}
DELETE :  http://localhost:8080/api/store/movies/{id}

Screens

Add a Movie

Update a Movie

Get all Movies

Get a Movie by its ID

Delete a Movie by its ID