Ieri sera si era deciso per questo nuovo formato di YAML:
---
nomeparam: value
nomeparam[]: arrayValue1
importMe.yaml:
groupName:
subgroupName:
nomeParam: true
// 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); | |
} |
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 |
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)) |
Ieri sera si era deciso per questo nuovo formato di YAML:
---
nomeparam: value
nomeparam[]: arrayValue1
importMe.yaml:
groupName:
subgroupName:
nomeParam: true