Shared PKG
Installation
Use go get.
go get github.com/go-funcards/shared
Generate JWT RSA Keys
mkdir -p .data/cert
openssl genrsa -out .data/cert/id_rsa 4096
openssl rsa -in .data/cert/id_rsa -pubout -out .data/cert/id_rsa.pub
MongoDB
URI example
mongodb://username:password@0.0.0.0:27017/dbname?authsource=admin&authmechanism=SCRAM-SHA-256
Docker container example
mkdir -p .data/mongodb
# create
docker run -v "$PWD/.data/mongodb":/data/db -d -p 27017:27017 --name=example-mongo -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password -e MONGO_INITDB_DATABASE=dbname mongo:5.0
# remove
docker rm -f example-mongo
# start
docker start example-mongo
# stop
docker stop example-mongo
License
Distributed under MIT License, please see license file within the code for more details.