Build an API for grocery list mobile app.
POST /groceries
{
title: "Milk",
category: "Milk based products",
amount: 1
| function convertApolloToV3Interaction( | |
| apolloInteraction: ApolloGraphQLInteraction, | |
| states?: V3ProviderState[], | |
| ): V3Interaction { | |
| const interaction = apolloInteraction.json(); | |
| return { | |
| states, | |
| uponReceiving: interaction.description, | |
| withRequest: { | |
| method: interaction.request.method, |
| function getTodos(listId, callback) { | |
| helpers.makeHttpCall({ | |
| url: '/todo/' + listId + '/items', | |
| success: function (data) { | |
| // Node-style CPS: callback(err, data) | |
| callback(null, data); | |
| } | |
| }); | |
| } | |
| // This wrapper is required for our stubbing to work |
| function magic() { | |
| console.log("MAGIC") | |
| } |
| # User for local dev | |
| FROM app/base | |
| RUN npm install -g orion-cli | |
| # This forces package-catalog update. Should speed up further runs | |
| RUN meteor show meteor-platform |
| # Assuming that you have followed all the instructions from https://github.com/rumblelabs/asset_sync | |
| # Put this in your deployment script | |
| # Choose any environment here the important part is that your environment is using the same bucket for all environments | |
| # than you only need to precompile assets once | |
| RAILS_ENV=staging bundle exec rake assets:precompile | |
| # You need to set git credentials otherwise it won't be able to commit | |
| git config --global user.email "codeship@codeship.com" | |
| git config --global user.name "Codeship Server" | |
| # Add your manifest file so that rails can find digested version of files |
| { "presets": ["es2015"] } |
| package parser | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| ) | |
| type Row struct { | |
| MenuId int | |
| Menu sql.NullString |
View this code at http://livecoding.io/5845125
View this code at http://livecoding.io/5814042