// There is a route, like this
var route = {
method: 'GET',
path: '/{agencyDomain}',
handler: handler.home,
config: {
pre: [ {
method: somePreMethod,
assign: 'somePreMethod'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
NewerOlder