Skip to content

Mortalife/serverless-assessment

Repository files navigation

Serverless Framework Node with Typescript HTTP API on AWS

Setup

Run this command to initialize a new project in a new working directory.

npm install

Usage

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"
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published