Skip to content

Instantly share code, notes, and snippets.

View nomadster's full-sized avatar
🙃

Alessandro Lensi nomadster

🙃
View GitHub Profile
@nomadster
nomadster / readme.md
Last active January 3, 2016 05:39
Nuovo formato YAML

Ieri sera si era deciso per questo nuovo formato di YAML:

---
 nomeparam: value
 nomeparam[]: arrayValue1
 importMe.yaml:

 groupName:
   subgroupName:
       nomeParam: true
var qhttp = require('q-io/http'),
_ = require('lodash'),
cacheServer = 'http://localhost:7000/',
dbServer = 'http://localhost:7001/';
//E' circa function(arg) { return String.concat(dbServer, arg) }
buildDbPath = _.bind(String.prototype.concat, dbServer);
qhttp.read(cacheServer)
//Chiama qhttp.read(String.concat(dbServer, il Return Di Quella Sopra))
.then(_.compose(qhttp.read, buildDbPath))
var _ = require('lodash');
var routingLoaderFunction = require('../lib/Routing-MODIFICATO'); //Prende due argomenti: filename, pathSVC
var routingLoaderParams = []; //Ad esempio il path Service, che comunque ce l'ho nel container ma ora mi manca :)
var routingFiles = ['../test/unit/data/routing-files/minimal.yml'];
//routing-minimal:
// path: /name-and-path-are-mandatory
var routingInternalObject = {}; //L'oggetto che sta dentro il container
//Questo sarà il metodo load della classe Container
// file: UnController.js
/**
* Un controller è già di per se un generator. Quindi qui non cambia molto.
*/
module.exports = function* (param1, $context, $view, serv){
//Qua possiamo usare le generator delegation
var result = yield* serv.method(42);
}