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
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
#API description projects
with different environments like staging and production no less! new: now with multiple account administration!
npm
in package.json
.process.env.STRONGLOOP_PORT || [your usual local port]
.git
.➽ If you need to handle multiple accounts, install the accounts plugin.
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
packages: | |
yum: | |
git: [] | |
files: | |
/opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh: | |
mode: "000755" | |
user: root | |
group: root | |
encoding: plain |
Fonte: http://gohorseprocess.wordpress.com | |
1- Pensou, não é XGH. | |
XGH não pensa, faz a primeira coisa que vem à mente. Não existe | |
segunda opção, a única opção é a mais rápida. | |
2- Existem 3 formas de se resolver um problema, a correta, a errada e | |
a XGH, que é igual à errada, só que mais rápida. |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
curl -o tlds-alpha-by-domain.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt | |
cat tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo % > %.txt' | |
tail -n +2 tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo "{\"tld\":\"%\", \"raw_data\":\"$(cat %.whois)\"}" | curl --trace-ascii /dev/stdout -d @- -H "content-type: application/json; charset=utf-8" http://192.168.3.7:3000/test/example4; echo "\nProcessing: %\n"' |
{ | |
"created" : 1445530618508, | |
"deck" : 0, | |
"description" : "Last interation/sprint before release", | |
"estimate" : false, | |
"name" : "iPhone 6s release", | |
"owner" : { | |
"fullname" : "Steve Jobs", | |
"id" : "d2a9ceb7-1696-f153-69e0-00a43b9971eb" | |
}, |
// assumes you add a timestamp field to each record (see Firebase.ServerValue.TIMESTAMP) | |
// pros: fast and done server-side (less bandwidth, faster response), simple | |
// cons: a few bytes on each record for the timestamp | |
var ref = new Firebase(...); | |
ref.orderByChild('timestamp').startAt(Date.now()).on('child_added', function(snapshot) { | |
console.log('new record', snap.key()); | |
}); |