Skip to content

fbielejec/shadow-cljs-serverless

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
api
 
 
 
 
 
 
 
 
 
 

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.

Offline development

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

Deploy

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