-
Notifications
You must be signed in to change notification settings - Fork 62
Dyson - Cannot GET /dummy #6
Comments
Thanks for trying out dyson. Let me try to describe how I meant this to work:
Dyson also sends the registered services to the console on boot (just like the demo), so if there's only "Dyson listening" then it didn't find any configs. So what might went wrong in your situation is starting dyson with the But of course there can also be a bug in dyson, which I would really care to know about. |
Well, looks like loader is not overriding the defaults in load():
returns 4 empty arrays: [] In requireDir(), it returns on the first conditional: if(!(fs.existsSync(dir) && fs.statSync(dir).isDirectory())) return; UPDATE: I think it is actually working as designed when I run dyson configs/ from within my app directory. So, when using 'configs/' , it is erroring on var g = require('dyson').generators from within get/dummy.js. module.js:340 So, my app is not a node app. It is just a static ember.js application for now, but I would think that since dyson is installed globally, that require('dyson') would still resolve. So by hardcoding the dependencies (dyson and lodash) back to the global directories: everything works. |
That is mentioned, yet briefly, in the README:
So you would need to add a package.json and make it a Node project, e.g.:
And then |
Ok ... make sense. Thanks a bunch. |
OK, I hope things are working out for you now. I updated the README with a note, and you can now include dyson-generators (instead of |
First off ... great project. I'd like to start using dyson for faking json data in my prototypes, but I am missing something in what should be a simple workflow.
It may very well be user error .. but Ive installed globally, and can run demo just fine.
I can init directories in my current projects, and even fire up dyson - to receive:
Dyson listening at port 3000
When I hit localhost:3000/dummy
or whatever config objects Ive placed in the directory, I get:
Cannot GET /dummy
with no exceptions thrown. Quiet console.
I'm going to dig in and figure this out, but thought Id log this for others and/or if you may know off the top of your head what I might be missing.
The text was updated successfully, but these errors were encountered: