This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
| defmodule MyApp.Checks.UnverifiedMocks do | |
| @moduledoc """ | |
| #{__MODULE__} looks for test files that import Mox and use | |
| the `expect/4` function, but do not enforce any assertions that | |
| the expectations have been called or not either by running `verify_on_exit` | |
| from a setup block or calling `verify!/0` or `verify!/1` inline | |
| in a test block. | |
| """ | |
| @message """ |
| import React from 'react' | |
| import { observer } from 'mobx-react' | |
| function ArtistList({ uiState: { artistData } }) { | |
| const { data } = artistData; | |
| if ( !data || !data.artists || !data.artists.length ) { | |
| return <div>No artists bruh.</div> | |
| } | |
| const { artists } = data | |
| return ( |
| const Post = new GraphQLObjectType({ | |
| name: "Post", | |
| description: "This represent a Post", | |
| fields: () => ({ | |
| _id: {type: new GraphQLNonNull(GraphQLString)}, | |
| title: { | |
| type: new GraphQLNonNull(GraphQLString), | |
| resolve: post => (post.title || "Does not exist") | |
| }, | |
| content: {type: GraphQLString} |
| var npm = require("npm"); | |
| var fs = require("fs-extra"); | |
| var chokidar = require("chokidar"); | |
| var packagePaths = [ | |
| "../mobile-app/node_modules/shared-package/lib", | |
| "../web-app/node_modules/shared-package/lib", | |
| ]; | |
| var noop = () => {}; |
| export function actionTypeBuilder(prefix) { | |
| return { | |
| type: actionType => `${prefix}/${actionType}`, | |
| loading: actionType => `${actionType}/loading`, | |
| ready: actionType => `${actionType}/ready`, | |
| stopped: actionType => `${actionType}/stopped`, | |
| changed: actionType => `${actionType}/changed`, | |
| error: actionType => `${actionType}/error`, | |
| success: actionType => `${actionType}/success` | |
| }; |
| defmodule HttpRequester do | |
| use GenServer | |
| def start_link(_) do | |
| GenServer.start_link(__MODULE__, nil, []) | |
| end | |
| def fetch(server, url) do | |
| # Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
| timeout_ms = 10_000 |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| nodes |