Run this command to initialize a new project in a new working directory.
npm install
Deploy
$ serverless deploy
Create example data
curl https://xxxxxxxxx.execute-api.eu-west-1.amazonaws.com/gen
Test a domain
curl --location 'https://xxxxxxxxx.execute-api.eu-west-1.amazonaws.com/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer secret' \
--data '{
"domain": "www.testdomain.com"
}'
Test a malicious domain
curl --location 'https://xxxxxxxxx.execute-api.eu-west-1.amazonaws.com/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer secret' \
--data '{
"domain": "www.malicious.com"
}'
Test an unknown domain
curl --location 'https://xxxxxxxxx.execute-api.eu-west-1.amazonaws.com/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer secret' \
--data '{
"domain": "www.somedomain.com"
}'