API created for fetch an image and upload to a S3 bucket.
yarn
npm install
Use the env.example to create an .env file.
serverless deploy
npm run test
npm run lint
POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/register
Body:
{
"email": "test@gmail.com",
"password": "test123",
"name": "Test"
}
POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/login
{
"email": "test@gmail.com",
"password": "test123"
}
POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/images
Header:
Authorization: Bearer ACCESS_TOKEN
Body:
{
"image_url": "https://github.githubassets.com/images/modules/open_graph/github-mark.png",
"key": "github.png"
}