Coder Social home page Coder Social logo

mikaelvesavuori / triplecheck-example-netlify Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 892 KB

TripleCheck broker running on Netlify Functions and FaunaDB.

License: MIT License

TypeScript 100.00%
triplecheck contract-testing consumer-driven-contracts consumer-contracts pacts

triplecheck-example-netlify's Introduction

triplecheck-example-netlify

TripleCheck example implementation

TripleCheck broker running on Netlify Functions

This repo demonstrates a working, basic implementation of a TripleCheck broker running on Netlify Functions (really just AWS Lambda) with the database in FaunaDB.

Refer to the documentation on the broker for how to call the API.

Technology choices are:

Pre-requisites

  • A Netlify account
  • A Fauna account
  • Logged in to Netlify
  • FaunaDB account and a database that's set up correctly (outlined below)

Instructions

Creating the FaunaDB database

  • In Fauna, create a database called triplecheck-broker.
  • Under Security, create a key for the database and set the role to Server
  • Paste the key's value into an .env file (go ahead and rename the env file provided in the repo) like this: FAUNA_KEY=some-secret-random-key
  • Create a new collection (call it triplecheck)
  • Create an index called Key and set the term to data.key; also enable Serialized and Unique

Setting up the Fauna key in Netlify

The easiest way to do this is to go to Netlify's web console, navigate to your project and under Build & deploy set a key under Environment variables like this: FAUNA_KEY with your key as the value.

Installation

Run npm install or yarn install.

Local development

Run npm start or yarn start.

Deploy

Run npm run deploy or yarn run deploy.

Teardown (remove stack)

You will have to remove your function manually through the Netlify web console.

triplecheck-example-netlify's People

Contributors

mikaelvesavuori avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.