Serverless Falcor Starter
This Serverless Framework project creates a REST API for a Falcor endpoint.
Getting Started
You need serverless
CLI(0.5.x or later). See http://docs.serverless.com/docs/installing-serverless .
Create and initialize project from serverless-falcor-starter:
serverless project install serverless-falcor-starter
Deploy function and endpoints:
cd serverless-falcor-starterserverless serverless endpoints deploy --all
Then your console says the API Gateway endpoint's URL such as:
Serverless: Successfully deployed endpoints in "dev" to the following regions:Serverless: us-east-1 ------------------------Serverless: GET - model - https://xxx.yyy.zzz.amazonaws.com/dev/modelServerless: POST - model - https://xxx.yyy.zzz.amazonaws.com/dev/modelServerless: OPTIONS - model - https://xxx.yyy.zzz.amazonaws.com/dev/model
copy this URL. So edit client-sample/config.json
file and replace the value of "endpoint"
to the copied URL:
You are ready to start client app! Finally exec the following, and open http://localhost:8080
!
cd client-samplenpm inpm start
Customize Falcor JSON Graph routing
This project include a Falcor router, falcor/model/router.js
. If you want more JSON Graph paths, you can add more route definitions at this file. See also Netfilx's falcor-router guide.
/* falcor/model/router.js */ ;
License
This software is released under the MIT License, see LICENSE.txt.