💫 Go MongoDB API

🎯 What is that

API made in Go using MongoDB and JWT.

🔧 Features

  • Not many libs & clean code
  • JWT & MongoDB
  • 3 routes (GET /token, GET (With token protection) /articles, POST (With token protection) /articles)

🚀 Run the project

  1. Update the configuration in config.yml

server:
  host: 127.0.0.1
  port: 8080

database:
  host: 127.0.0.1
  port: 27017
  name: test
  user: test
  password: test
  ssl: false

jwt:
  secret: JwtSecret1234!
  1. Run

go run main.go
  1. Enjoy

By default, the API is available at the following address: http://127.0.0.1:8080 or http://localhost:8080

GitHub

https://github.com/rmymrtin/go-mongodb-api