Created
February 19, 2014 15:41
-
-
Save nomadster/9094609 to your computer and use it in GitHub Desktop.
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
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 | |
_(routingFiles).forEach(function(file){ | |
_.assign(routingInternalObject, routingLoaderFunction.call(this,file,routingLoaderParams) ); | |
}) | |
console.log(routingInternalObject); | |
//Stampa: | |
{ 'routing-minimal': | |
{ name: 'routing-minimal', | |
path: '/name-and-path-are-mandatory', | |
methods: [ 'all' ], | |
args: { params: {} } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment