Node.JS
Setup
Clone the server
Start by cloning the server repository from GitHub. You can do this by running the following command:
git clone https://github.com/aserto-demo/todo-node-js-v2
Install dependencies
To install the application dependencies, run the following command:
yarn
Set up the .env
file
Copy the .env.example
file to .env
and update the CA_FILE
path to correspond to the path in which Topaz generated your certificates (by default this path will be $HOME/.config/topaz/certs/grpc-ca.crt
).
Also make sure that ASERTO_AUTHORIZER_SERVICE_URL=localhost:8282
and ASERTO_DIRECTORY_SERVICE_URL=localhost:9292
.
JWKS_URI=https://citadel.demo.aserto.com/dex/keys
ISSUER=https://citadel.demo.aserto.com/dex
AUDIENCE=citadel-app
ASERTO_POLICY_ROOT=todoApp
ASERTO_AUTHORIZER_SERVICE_URL=localhost:8282
ASERTO_DIRECTORY_SERVICE_URL=localhost:9292
CA_FILE=<PATH_TO_CERTIFICATES>/certs/grpc-ca.crt
Start the server
yarn start
Next steps
Test your server by using the sample web Todo application.