Skip to content

Latest commit

 

History

History

mongo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ORY Fosite Example Server (feat. Mongo)

Build Status

ORY Fosite is the security first OAuth2 & OpenID Connect framework for Go. Built simple, powerful and extensible. This repository contains an exemplary http server using ORY Fosite for serving OAuth2 requests.

Prerequisites

The mongo demo expects that you have a local (default) instance of mongo running. This means, a mongo listening at localhost:27017 with no authentication enabled.

The easiest way to get this up and running is if you have docker pre-installed.

Docker

In a terminal run the following:

docker run -d -p 27017:27017 mongo:7.0

Local Installation

Install the community edition of MongoDB on your computer locally following the steps from mongo's documentation site

Install and run

The Fosite example server requires go@1.14 or higher installed as it uses go modules for dependency management. Once Go and mongo have been installed, run the demo:

$ go get -d github.com/matthewhartstonge/storage/example/mongo
$ cd $GOPATH/src/github.com/matthewhartstonge/storage/example/mongo
$ go run main.go