Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ashiqyousuf/greenlight

Greenlight - A dumb open source movies API
https://github.com/ashiqyousuf/greenlight

golang postgres rest-api

Last synced: 27 days ago
JSON representation

Greenlight - A dumb open source movies API

Awesome Lists containing this project

README

        

# Greenlight :- A dumb open source movies API


##### Requirements:

* Install Go version >= 17 (https://go.dev/doc/install)

* Postgres as database (https://www.postgresql.org/download/)

* Install Deps using `go get`

* The Makefile in the root directory of the project will guide you for configuration. Run the following command, make sure you are in the root dir (greenlight):-



`
$ make help
`

* Add the following variables to your .envrc file (in the root dir):-

* export GREENLIGHT_DB_DSN=postgres://user:password@host/db

* export SMTP_HOST=sandbox.smtp.mailtrap.io (any mail hosting service)

Add the following credentials from your smtp service provider

* export SMTP_USER=2yr23fhfkjnfk

* export SMTP_PASSWORD=wndlfn3j2oi2

* export SMTP_PORT=2525

* Getting to know about about env flags:-

`
$ go run ./cmd/api -help
`

* Running the project locally:-

`
$ go run ./cmd/api --flags
`

or

`
$ make run/api
`