Skip to content

Framework-less REST API, allowing you to store and retrieve simple movie data in JSON format. Follows standard good practices regarding UX and HTTP.

Notifications You must be signed in to change notification settings

niewolinsky/go-moviedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MovieDB - Go REST API serving submitted movies data

Framework-less REST API, allowing you to store and retrieve simple movie data in JSON format. Follows standard good practices regarding UX and HTTP.

Application created as a part of my learning journey using Go as web back-end, it is not production ready.

Features:

  • Version control enabled database schema based on migrations
  • Token-based user authentication and permission-based authorization
  • Simple metrics exposed as an endpoint + comprehensive command line logger during runtime
  • New user registration email with activation process
  • Simple built-in rate limiting configurable from command line arguments
  • Sending and retrieving movie data
  • Filtering, sorting and pagination based on PostgreSQL methods, when pulling the data

Running:

After configuring PostgreSQL database on your server, create .env file in project's root directory with KEY=VALUE: MOVIE_DB_DSN={YOUR_POSTGRE_DSN}.

Then run database migrations using migrate tool and task build tool. Both dependencies have to be installed.

$ [task|go-task] db/migrations/up

Use script to easily run app

$ [task|go-task] audit
$ [task|go-task] run/api #or build/api

Lastly don't forget to change SMTP credidentals to your provider in main.go, as the application requires sending registration email.

Todo:

  • Password reset feature

Stack:

Credits:

Application was heavily inspired by Alex Edward's - Let's Go Further book.

About

Framework-less REST API, allowing you to store and retrieve simple movie data in JSON format. Follows standard good practices regarding UX and HTTP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages