A microservice for authenticating DotWallet users, processing payments, and saving data on chain.
This allows developers to quickly add DotWallet API functionality to their app.
Any use of this microservice must start with a real user login to dotwallet. That will generate a code
, which the microservice will use to authenticate the request. The server will return a server_token
with a default expiry of 30 days (can be changed in .env file). All subsequent requests require this token.
This server includes complete API endpoint documentation. To see how to make requests to the server's API, run the app locally and go to http:localhost:3005/docs
Check out a live version of this microservice here. You can send http requests to it as per the auto generated docs
There are two ways to use this microservice:
- Directly call the microservice from your front-end application:
- Save the
server_token
in the client, and use for subsequent requests
- Save the
- Call the microservice from your backend server.
- When calling the '/auth' endpoint, include the
token_redirect_uri
param. - Save the
server_token
on your backend. Note: theserver_token
is unique to each user.
- When calling the '/auth' endpoint, include the
- Download and install the google cloud cli reference
- Create a project on https://cloud.google.com/run/ and then run:
gcloud projects list
# Find your project_id
gcloud config set project <your_project_name>
# Check with:
gcloud config get-value project
# Change the .env file to include the project_id. Then:
yarn google-build
yarn google-deploy
- Add your domain name and email to the .env file
- Change the
<your_domain>
's in deploy/nginx/prod/app.conf to your domain. i.e. my-site.com - then:
yarn ssl-deploy
yarn dev
# test
yarn test
# with watching
yarn test-watch
build docker image
yarn build