In this example, ooth is a standalone microservice.
Standalone Ooth server with
- Guest login
- Local login
cd ooth
cp .env.dist .env
vi .env # Or edit with editor of your choice
yarn
yarn start
This is an example of a protected graphql API, to which the user will need to authenticate using a JWT.
cd api
cp .env.dist .env
vi .env # Or edit with editor of your choice
yarn
Run
yarn start
The GraphQL endpoint is /graphql
. Visit /graphiql
to play with the data.
Notice how you can query posts and comments, but not insert any without having logged in.
The client is a create-react-app that connects to the API.
Run (in a new terminal)
cd client
yarn
yarn start
Assuming you already have set up the .env
files.
copy .env
to .env.docker
and set the db host to db
, e.g.
MONGO_URL: mongodb://db:27017/ooth
copy .env
to .env.docker
and set the db host to db
, e.g.
MONGO_URL: mongodb://db:27017/ooth
docker-compose up