Skip to content
Permalink
Browse files

cleanup

  • Loading branch information...
notrab committed Jul 2, 2019
1 parent accdf7d commit b3e323daeca8a4a0bb27fee009e27f0dc191e4cd
Showing with 109 additions and 225 deletions.
  1. +2 −0 .github/CODEOWNERS
  2. +78 −7 .gitignore
  3. +0 −8 CONTRIBUTING.md
  4. +25 −29 README.md
  5. 0 { → misc}/apollo-server/README.md
  6. 0 { → misc}/apollo-server/index.js
  7. 0 { → misc}/apollo-server/package.json
  8. 0 { → misc}/apollo-server/yarn.lock
  9. 0 { → misc}/cli-app/README.md
  10. 0 { → misc}/cli-app/index.js
  11. 0 { → misc}/cli-app/package.json
  12. 0 { → misc}/cli-app/yarn.lock
  13. +0 −74 now.json
  14. +0 −17 order-confirmation-email/now.json
  15. +0 −19 order-confirmation-sms/now.json
  16. +0 −17 shipping-confirmation-email/now.json
  17. +0 −19 shipping-confirmation-sms/now.json
  18. +0 −16 short-order-id/now.json
  19. 0 { → storefronts}/express/README.md
  20. +4 −3 { → storefronts}/express/index.js
  21. 0 { → storefronts}/express/package.json
  22. 0 { → storefronts}/express/views/index.pug
  23. 0 { → storefronts}/express/views/product.pug
  24. 0 { → storefronts}/express/yarn.lock
  25. 0 { → storefronts}/nextjs/.gitignore
  26. 0 { → storefronts}/nextjs/README.md
  27. 0 { → storefronts}/nextjs/lib/moltin.js
  28. 0 { → storefronts}/nextjs/package.json
  29. 0 { → storefronts}/nextjs/pages/index.js
  30. 0 { → storefronts}/nextjs/pages/product.js
  31. 0 { → storefronts}/nextjs/yarn.lock
  32. +0 −16 sync-catalog-to-algolia/now.json
  33. 0 { → webhooks}/order-confirmation-email/README.md
  34. 0 { → webhooks}/order-confirmation-email/index.js
  35. 0 { → webhooks}/order-confirmation-email/package.json
  36. 0 { → webhooks}/order-confirmation-email/yarn.lock
  37. 0 { → webhooks}/order-confirmation-sms/README.md
  38. 0 { → webhooks}/order-confirmation-sms/index.js
  39. 0 { → webhooks}/order-confirmation-sms/package.json
  40. 0 { → webhooks}/order-confirmation-sms/yarn.lock
  41. 0 { → webhooks}/shipping-confirmation-email/README.md
  42. 0 { → webhooks}/shipping-confirmation-email/index.js
  43. 0 { → webhooks}/shipping-confirmation-email/package.json
  44. 0 { → webhooks}/shipping-confirmation-email/yarn.lock
  45. 0 { → webhooks}/shipping-confirmation-sms/README.md
  46. 0 { → webhooks}/shipping-confirmation-sms/index.js
  47. 0 { → webhooks}/shipping-confirmation-sms/package.json
  48. 0 { → webhooks}/shipping-confirmation-sms/yarn.lock
  49. 0 { → webhooks}/short-order-id/README.md
  50. 0 { → webhooks}/short-order-id/index.js
  51. 0 { → webhooks}/short-order-id/package.json
  52. 0 { → webhooks}/short-order-id/yarn.lock
  53. 0 { → webhooks}/sync-catalog-to-algolia/README.md
  54. 0 { → webhooks}/sync-catalog-to-algolia/index.js
  55. 0 { → webhooks}/sync-catalog-to-algolia/package.json
  56. 0 { → webhooks}/sync-catalog-to-algolia/yarn.lock
  57. 0 { → webhooks}/sync-orders-to-big-query/README.md
  58. 0 { → webhooks}/sync-orders-to-big-query/bq-helper.js
  59. 0 { → webhooks}/sync-orders-to-big-query/decrypt-helper.js
  60. 0 { → webhooks}/sync-orders-to-big-query/index.js
  61. 0 { → webhooks}/sync-orders-to-big-query/mapping.js
  62. 0 { → webhooks}/sync-orders-to-big-query/package.json
  63. 0 { → webhooks}/sync-orders-to-big-query/serverless.yml
  64. 0 { → webhooks}/sync-orders-to-big-query/yarn.lock
@@ -0,0 +1,2 @@
* @notrab @ynnoj
/sync-orders-to-big-query/ @matthew1809
@@ -1,9 +1,80 @@
node_modules
localStorage
dist
vendor
yarn-error.log
.DS_Store
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env
.serverless

# gatsby files
.cache/
public

# Next files
/out

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js

# Yarn Integrity file
.yarn-integrity

# Serverless
.serverless

# Dependencies
localStorage
vendor

This file was deleted.

@@ -2,50 +2,46 @@

[![Join us on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/moltin)

Here you will find example demo stores and serverless functions that can be used with [Moltin webhooks](https://docs.moltin.com/advanced/events). Pick an example and follow the README for usage instructions.
Here you will find example demo stores and serverless functions that can be used with [Moltin webhooks](https://docs.moltin.com/advanced/events). Pick an example and follow the `README` for usage instructions.

**They are not to be treated as production-ready.**

## Storefronts

Discover how to connect popular frontend frameworks and static site generators with Moltin.

| Example | Demo | Description |
| ------------------- | ------------------------------------------------------------------------------------ | --------------------------------------- |
| [Gatsby](/nextjs) | [https://gatsby-demo-store.moltin.now.sh](https://gatsby-demo-store.moltin.now.sh) | An example store using Gatsby |
| [React](/react) | [https://react-demo-store.moltin.now.sh](https://react-demo-store.moltin.now.sh) | An example store using Create React App |
| [Next.js](/nextjs) | [https://nextjs-demo-store.moltin.now.sh](https://nextjs-demo-store.moltin.now.sh) | An example store using Next.js |
| [Vue](/vue) | [https://vue-demo-store.moltin.now.sh](https://vue-demo-store.moltin.now.sh) | An example store using Vue |
| [Nuxt.js](/nuxtjs) | [https://nuxt-demo-store.moltin.now.sh](https://nuxt-demo-store.moltin.now.sh) | An example store using Nuxt.js |
| [Express](/express) | [https://express-demo-store.moltin.now.sh](https://express-demo-store.moltin.now.sh) | An example store using Express |
| Example | Demo | Description |
| ------------------------------- | ------------- | ------------------------------ |
| [Next.js](/storefronts/nextjs) | _Coming soon_ | An example store using Next.js |
| [Express](/storefronts/express) | _Coming soon_ | An example store using Express |

## Webhooks (aka "integrations")

Integrate with Moltin using 3rd party services with AWS Lambda, Zeit Now, Netlify Functions & more.
Integrate with Moltin using 3rd party services with AWS Lambda, Zeit Now, Netlify Functions & more. [Learn more](https://docs.moltin.com/api/advanced/events).

| Example | SDK | Description |
| --------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
| [Order Confirmation via Email](/order-confirmation-email) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Order confirmation email with Postmark. |
| [Order Confirmation via SMS](/order-confirmation-sms) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Order confirmation SMS via Twilio. |
| [Shipping Confirmation via Email](/shipping-confirmation-email) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Shipping confirmation email with Postmark. |
| [Shipping Confirmation via SMS](/shipping-confirmation-sms) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Shipping confirmation SMS via Twilio. |
| [Short Order ID](/short-order-id) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Assign a short random ID to new orders. |
| [Sync catalog to Algolia](/sync-catalog-to-algolia) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Sync products, brands, categories and collections to Algolia. |
| [Sync Orders to BigQuery](/sync-orders-to-big-query) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Sync order + order items to Google BigQuery. |
| Example | SDK | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------- |
| [Order Confirmation via Email](/webhooks/order-confirmation-email) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Order confirmation email with Postmark. |
| [Order Confirmation via SMS](/webhooks/order-confirmation-sms) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Order confirmation SMS via Twilio. |
| [Shipping Confirmation via Email](/webhooks/shipping-confirmation-email) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Shipping confirmation email with Postmark. |
| [Shipping Confirmation via SMS](/webhooks/shipping-confirmation-sms) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Shipping confirmation SMS via Twilio. |
| [Short Order ID](/webhooks/short-order-id) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Assign a short random ID to new orders. |
| [Sync catalog to Algolia](/webhooks/sync-catalog-to-algolia) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Sync products, brands, categories and collections to Algolia. |
| [Sync Orders to BigQuery](/webhooks/sync-orders-to-big-query) | [`@moltin/request`](https://github.com/moltin/moltin-request) | Sync order + order items to Google BigQuery. |

## Misc

| Example | Demo | Description |
| ------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------- |
| [Apollo Server](/apollo-server) | [https://apollo-server-demo.moltin.now.sh](https://apollo-server-demo.moltin.now.sh) | An example GraphQL server with Moltin |
| [CLI](/cli-app) | | An example CLI that queries products |
| Example | Demo | Description |
| ------------------------------------ | ------------- | ------------------------------------- |
| [Apollo Server](/misc/apollo-server) | _Coming soon_ | An example GraphQL server with Moltin |
| [CLI](/misc/cli-app) | _N/A_ | An example CLI that queries products |

## Reference implementations
## Reference applications

If you're looking for more real world examples using Moltin, check out any of the following examples:

| Example | Description |
| ---------------------------------------------------------------- | ----------- |
| [Gatsby Demo Store](https://github.com/moltin/gatsby-demo-store) | |
| [Next.js Demo Store](https://github.com/moltin/next-demo-store) | |
| [Vue Demo Store](https://github.com/moltin/gatsby-demo-store) | |
| Example | Description |
| ----------------------------------------------------------------- | ---------------------------------------------- |
| [Gatsby Demo Store](https://github.com/moltin/gatsby-demo-store) | Built using the `gatsby-source-moltin` plugin. |
| [Next.js Demo Store](https://github.com/moltin/nextjs-demo-store) | React supercharged with Next.js + Moltin |
| [Vue Demo Store](https://github.com/moltin/vue-demo-store) | Plain old Vue + Moltin |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
@@ -2,19 +2,20 @@ const express = require('express')
const { MoltinClient } = require('@moltin/request')

const app = express()

const moltin = new MoltinClient({
client_id: 'h93GLWVTdw3EUd9ev7g8Z7ROq54s5JVAzivz9ZrIe1'
client_id: 'h93GLWVTdw3EUd9ev7g8Z7ROq54s5JVAzivz9ZrIe1',
})

app.set('view engine', 'pug')

app.get('/', async (req, res, next) => {
app.get('/', async (req, res) => {
const { data: products } = await moltin.get('products')

res.render('index', { products })
})

app.get('/products/:id', async (req, res, next) => {
app.get('/products/:id', async (req, res) => {
const { id } = req.params
const { data: product } = await moltin.get(`products/${id}`)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b3e323d

Please sign in to comment.
You can’t perform that action at this time.