Demo app, developing cloud infra with shadow-cljs and serverless. It showcases a simple graphql endpoint running as an AWS Lambda function.
Note the flag to skip cache invalidation, or else shadow's own hot reloading will cause errors with the offline mode reload:
yarn api:watch
cd api/
sls offline --skipCacheInvalidation
Navigate to http://localhost:4000/graphql and run this test query
{
getTodos {
id
name
}
}
or using curl:
curl -X POST -H "Content-Type: application/json" --data \
'{ "query": "{ getTodos { id name } }" }' \
http://localhost:4000/graphql
Pretty much follow the getting-started guidelines. You need serverless CLI installed:
npm install --global serverless
Login to serverless dashboard. It will gide you through the process if you need to create an account:
serverless login
Navigate to dashboard and create new application called serverless-demo
.
Deploy the application:
yarn api:release
cd api/
sls deploy