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
resource "digitalocean_droplet" "haproxy-www" { | |
image = "ubuntu-14-04-x64" | |
name = "haproxy-www" | |
region = "nyc2" | |
size = "512mb" | |
private_networking = true | |
ssh_keys = [ | |
"${var.ssh_fingerprint}" | |
] | |
connection { |
<?php | |
namespace Acme\Builder; | |
class TestDataBuilder | |
{ | |
/** | |
* @var array | |
*/ | |
protected $defauts = []; |
#!/usr/bin/python -tt | |
# | |
import datetime | |
import json | |
import logging | |
import logging.handlers | |
import optparse | |
import os | |
import re | |
import shutil |
package main | |
import "strconv" | |
import "fmt" | |
type Color string | |
type Make string | |
type Model string | |
const ( |
module Serverspec | |
module Type | |
class Partition < Base | |
def initialize(partition, type) | |
@name = partition | |
@partition_table = {} | |
case type | |
when 'cylinder' | |
options = "-l" |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
By Thomas Darr (@trdarr), with love.
“How has no one yet written a tutorial for deploying Hubot on @digitalocean? cc @beyroutey”
— Miles Grimshaw (@milesgrimshaw), 10 Dec 2013
var express = require('express'); | |
var blahController = require('./example-controller'); //and so on and so forth | |
var routes = require('./routes'); | |
var app = express() | |
var controllers = { | |
blah: blahController, | |
user: userController | |
} |
require 'rake' | |
require 'rspec/core/rake_task' | |
require 'yaml' | |
require 'highline/import' | |
properties = YAML.load_file('properties.yaml') | |
ENV['SSH_USER'] = ask("Enter ssh user: ") { |q| q.echo = true } | |
ENV['SSH_PASSWORD'] = ask("Enter ssh password: ") { |q| q.echo = false } |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.