I hereby claim:
- I am nvcexploder on github.
- I am benacker (https://keybase.io/benacker) on keybase.
- I have a public key ASBfdz0pXE7jpW_iXuJxTg35h1Y41RxAm0R-Vp58HNeP-Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
/* | |
For this to run, ensure that `npm install hapi` has happened in your directory | |
setup whilst writing this: | |
iojs v. 1.0.5 | |
hapi 8.2.0 | |
*/ | |
var Hapi = require('hapi'); |
var Hapi = require('hapi'); | |
var Fs = require('fs'); | |
var options = { | |
tls: { | |
key: Fs.readFileSync(your_key), | |
cert: Fs.readFileSync(your_cert) | |
} | |
}; |
$ npm install hapi joi | |
#A good way to test is this: | |
$ curl --form [email protected] localhost:8080/selfies |
// wherever you're setting up your server, this was within a register method for a plugin: | |
plugin.select('api').ext('onRequest', internals.onRequest); | |
//somewhere else in that file or whatever | |
var onRequest = function (request, next) { | |
request.setUrl(exports.rewriteUrl(request.raw.req.url)); | |
next(); |
I hereby claim:
To claim this, I am signing this object:
exports.create = { | |
description: 'Creates a new cart', | |
validate: { | |
payload: { | |
location: Joi.object({ | |
postalCode: Joi.string().required().description('Postal Code'), | |
city: Joi.string().optional().description('City'), | |
state: Joi.string().optional().description('State or Province Code'), | |
country: Joi.string().optional().description('Country') |
var hapi = require('hapi'); | |
var server = hapi.createServer('localhost', 8080); | |
var server2 = hapi.createServer('localhost', 8080); | |
server.start(); | |
server2.start(); |