Skip to content

fbielejec/shadow-cljs-serverless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shadow-cljs-serverless

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

Prerequisites

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

About

Deploy graphql endpoint written in cljs on AWS lambda using serverless

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published