The serverless backend for captainslog.xyz.
captains-log-api
is a serverless REST API. Along with the captains-log-frontend
, it lets authenticated users keep a personal diary in the cloud.
I started this project as a personal experiment using NextJS with a serverless backend. This backend part was bootstrapped with Create Serverless Stack. It specifies infrastructure as code, leveraging the sst-cli
tool to create all the resources it needs on AWS. The CRUD endpoints are all powered by lambda functions (see /src/
). Diary entries are stored in a DynamoDB table, and user's uploads are stored in S3.
You easily can deploy your own copy of this api.
Start by installing the dependencies.
npm install
Starts the local Lambda development environment.
Build your app and synthesize your stacks.
Generates a .build/
directory with the compiled files and a .build/cdk.out/
directory with the synthesized CloudFormation stacks.
Deploy all your stacks to AWS. Or optionally deploy, a specific stack.
Remove all your stacks and all of their resources from AWS. Or optionally removes, a specific stack (e.g. npx sst remove --stage prod
)
Runs your tests using Jest. Takes all the Jest CLI options.