Skip to content

golang with google oauth and postgres. Implemented in clean-architecture with sql migration.

Notifications You must be signed in to change notification settings

foryforx/ibossgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Golang with Google OAuth + postgres backend(option to move to mongo) + sql migration + clean architecture

Got kick start from (https://github.com/Skarlso/goprogressquest).

Installation

Simply go get github.com/karuppaiah/golang-oauth-postgres-clean-architecture.

Setup

export ENV=development export DATABASE_URL=postgres://postgres@localhost:5432/ibossgo?sslmode=disable

Postgres

export PGHOST=localhost export PGPORT=5432 export PGDATABASE=ibossgo export PGUSER=postgres export PGPASSWORD= export PGSSLMODE=disable export BASE_URL=localhost:9090 export BASE_PROTOCOL=http

Google

In order for the Google Authentication to work, you'll need developer credentials which the this application gathers from a file in the root directory called creds.json. The structure of this file should be like this:

{
  "cid":"hash.apps.googleusercontent.com",
  "csecret":"somesecrethash"
}

To obtain these credentials, please navigate to this site and follow the procedure to setup a new project: Google Developer Console.

Dependencies

To gather all the libraries this project uses, simply execute from the root: go get -v ./...

Running

To run it, simply build & run and navigate to http://127.0.0.1:9090/login, nothing else should be required.

go build
(install fresh: https://github.com/gravityblast/fresh) 
fresh

About

golang with google oauth and postgres. Implemented in clean-architecture with sql migration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published