/fauna-graphql-crud-lambda

Full lambda graphql serveur and db --> https://fauna.com + https://www.apollographql.com/ + https://zeit.co/docs/v2/deployments/concepts/lambdas/

Primary LanguageJavaScript

Prerequit :

  • Create a database with a key you put on now.json 👢
  • Create a Logs class

Fork of apollo Server with fauna on lambda

This example offers a pre-setup project for Apollo Server that allows you to get up and running in no time!

You can run the following command now init apollo to fetch the example to your local machine.

This Apollo Server example features the now.json configuration file below.

{
  "version": 2,
  "builds": [{ "src": "index.js", "use": "@now/node-server" }],
  "routes": [{ "src": "/.*", "dest": "index.js" }],
  "env": {
    "fauna": "XXXX"
  }
}

now.json

  • The version property specifies Now 2.0.

  • The routes property allows Now to route your deployment either by using a source and destination, or by way of a source, status, and headers.

  • The builds property allows Now to use a builder with a specific source target.

  • the env

The @now/node-server builder enables a Node.js server deployment.

Deploy the app with Now.

$ now

To develop :

download latest now cli and run

 now dev

Resources