Skip to content

Instantly share code, notes, and snippets.

View dpaez's full-sized avatar
🥃
Check out SHER: https://sher.app 🎙️

Diego dpaez

🥃
Check out SHER: https://sher.app 🎙️
View GitHub Profile
'use strict';
console.log('------------------Let------------------------');
let x = 5;
console.log( 'START scope global > x', x );
function pruebaLet(){
let x = 2;
console.log( '\tscope prueba Let' );
console.log( '\tx >', x );
if (true){
@dpaez
dpaez / route-plugins-options.md
Last active April 22, 2016 19:36
hapijs, plugins options via route issue.
// There is a route, like this
var route = {
  method: 'GET',
  path: '/{agencyDomain}',
  handler: handler.home,
  config: {
    pre: [ {
      method: somePreMethod,
 assign: 'somePreMethod'
@dpaez
dpaez / hapi_layout.txt
Last active March 3, 2016 02:23
HapiJS Server Structure
// HapiJS server directory layout
└── server
├── config // Confidence config
├── index.js // Server entry point
├── methods // Server methods
├── plugins // All your plugins
├── routes // All your routes and pre's
│ └── route
│ ├── pre // route pre-requisites