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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
haiku = -> | |
adjs = [ | |
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark", | |
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter", | |
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue", | |
"billowing", "broken", "cold", "damp", "falling", "frosty", "green", | |
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old", | |
"red", "rough", "still", "small", "sparkling", "throbbing", "shy", | |
"wandering", "withered", "wild", "black", "young", "holy", "solitary", | |
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine", |
# Ignore everything in this directory | |
* | |
# Except this file | |
!.gitignore |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_geoforce { | |
server 127.0.0.1:3000; | |
} | |
upstream app_pcodes{ | |
server 127.0.0.1:3001; | |
} |
import axios from 'axios'; | |
import { mapKeys, mapValues, camelCase, snakeCase } from 'lodash'; | |
const { API_URL } = process.env; | |
function getAccessToken() { | |
// @todo: load access token from cookie | |
return 'token'; | |
} |
{ | |
"next": "", | |
"duration": "46ms", | |
"results": [{ | |
"created_at": "2017-06-28T16:38:58.806970", | |
"updated_at": "2017-06-28T16:38:58.806970", | |
"activities": [{ | |
"actor": "ian", | |
"foreign_id": "5", | |
"target": null, |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project: