apigee-127 / bagpipes

Less code, more flow. Let's dance!
MIT License
47 stars 30 forks source link

cannot load user fittings #12

Closed itai421 closed 8 years ago

itai421 commented 8 years ago

I have a problem adding my own fitting.

in my default.yaml config file I have:

fiitingDirs: [ api/fittings]

and I added my fitting file under api/fittings.

as I start my server I get an error saying: cannot find the module: *******\bagpipes\lib\fittings\FITTING_NAME

it seems to not search for the fitting under api/fitting (where my fitting is placed).

so I've looked at the code and I think that the problem is inside the file bagpipes\lib\fittingTypes\system.js:12 and that this: pipes.config.fittingsDir should be changed to pipes.config.userFittingsDirs like it have been used in other places in the project

just for info, I'm using bagpipes throw swagger-express

itai421 commented 8 years ago

this change is not needed. my problem was that the name of the function I returned from the create function was not the same as the one in the default.yaml config

theganyo commented 8 years ago

Great! Glad you got things working!