To start using the example application, follow the steps:
-
Set up environmental variables.
export PROOF_URL=https://app.proofgov.com export PROOF_API_TOKEN=<some-token>
If you were provided a Form ID, you can set it via:
export PROOF_FORM_ID=1
-
Run
yarn install
. -
Run
yarn setup-form
(this setups a new form, if needed, and updates the schema). -
If you want to generate sample submissioned; run
yarn generate-submission
. -
Run
yarn server
. -
Now you're ready to receive requests on http://localhost:4000.
Once you have the server runing, you can submit a request via cURL:
curl steve:password@localhost:4000/covid-cases
You can see and modify users/passwords in the config.js
file.
Both yarn setup-form
and yarn generate-submission
support a --help
option for more details.
Running yarn setup-form
may create a provider_info.yaml
file that is used for subsequent requests.
In case you need to generate a lot of submissions, you can run while true; do yarn generate-submission; done
. (ctrl-c
to exit).