From 95631d2d6963f90193a63238ca72d4c0bdf96ebd Mon Sep 17 00:00:00 2001 From: swyx Date: Thu, 2 May 2019 14:41:22 -0400 Subject: [PATCH 1/3] Create README.md --- .../event-triggers/netlfy-functions/README.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 community/boilerplates/event-triggers/netlfy-functions/README.md diff --git a/community/boilerplates/event-triggers/netlfy-functions/README.md b/community/boilerplates/event-triggers/netlfy-functions/README.md new file mode 100644 index 0000000000000..5ef9f179e2ed0 --- /dev/null +++ b/community/boilerplates/event-triggers/netlfy-functions/README.md @@ -0,0 +1,38 @@ +# Event trigger boilerplates on Zeit Now + +Contributions are welcome for boilerplates in other languages. + +### Setup Hasura GraphQL Engine + +Click on the following button to deploy GraphQL Engine on Heroku with the free Postgres add-on: + +[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku) + +Checkout [docs](https://docs.hasura.io/1.0/graphql/manual/deployment/index.html) for other deployment options. + + +### Setup `netlify-cli` + +1. Create a Zeit account @ https://app.netlify.com +2. Download [netlify-cli](https://www.netlify.com/docs/cli/): + ```bash + npm install netlify-cli -g + ``` +3. Login to `netlify`: + ```bash + ntl login + ``` +4. Create a Netlify instance: + ```bash + ntl init # or `ntl link` if you already have one and want to link the project + ``` + +### Setup and deploy the trigger + +``` +ntl functions:create # and pick the hasura template +``` + +The code is located [here](https://github.com/netlify/netlify-dev-plugin/tree/master/src/functions-templates/js/hasura-event-triggered) + +and you can write and host your own in your own git repo. From 475a498f021d906cfdb50b4e418e46b6c61f069f Mon Sep 17 00:00:00 2001 From: swyx Date: Thu, 2 May 2019 14:43:31 -0400 Subject: [PATCH 2/3] Update README.md --- .../event-triggers/netlfy-functions/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/community/boilerplates/event-triggers/netlfy-functions/README.md b/community/boilerplates/event-triggers/netlfy-functions/README.md index 5ef9f179e2ed0..957a33954f74a 100644 --- a/community/boilerplates/event-triggers/netlfy-functions/README.md +++ b/community/boilerplates/event-triggers/netlfy-functions/README.md @@ -36,3 +36,11 @@ ntl functions:create # and pick the hasura template The code is located [here](https://github.com/netlify/netlify-dev-plugin/tree/master/src/functions-templates/js/hasura-event-triggered) and you can write and host your own in your own git repo. + +When you are ready to deploy your functions to production, use: + +``` +ntl deploy --prod +``` + +For built in authentication, check [netlify-identity-widget and its alternatives](https://github.com/netlify/netlify-identity-widget#list-of-alternatives). From 447327b66ed078e1e1b465ebfe4fb4aa6dde1e0e Mon Sep 17 00:00:00 2001 From: swyx Date: Fri, 3 May 2019 02:57:16 -0400 Subject: [PATCH 3/3] Update README.md --- .../boilerplates/event-triggers/netlfy-functions/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/community/boilerplates/event-triggers/netlfy-functions/README.md b/community/boilerplates/event-triggers/netlfy-functions/README.md index 957a33954f74a..53b8bad9848f9 100644 --- a/community/boilerplates/event-triggers/netlfy-functions/README.md +++ b/community/boilerplates/event-triggers/netlfy-functions/README.md @@ -1,4 +1,4 @@ -# Event trigger boilerplates on Zeit Now +# Event trigger boilerplates on Netlify Contributions are welcome for boilerplates in other languages. @@ -13,7 +13,7 @@ Checkout [docs](https://docs.hasura.io/1.0/graphql/manual/deployment/index.html) ### Setup `netlify-cli` -1. Create a Zeit account @ https://app.netlify.com +1. Create a Netlify account @ https://app.netlify.com 2. Download [netlify-cli](https://www.netlify.com/docs/cli/): ```bash npm install netlify-cli -g