Closed blakemcbride closed 9 years ago
I upgraded node to 0.12.0. Same error.
I am gathering that I need to run the server in a fiber too in order for this to work, however, you have an example of starting a node server in a fiber but not one for express. How can I start the express server in a fiber (if that is my problem)?
Thanks.
yes you need fibers.
check the error: Object #<Object> has no method 'status'
fiber.run
is the last exit point. but the error origin is:
at handleGet (/home/blake/ComponentServer/routes/components/search.js:25:9)
what's there? maybe this? res.status(404).send('Not found'); // just for testing
do res have a status member?
also check in your code:
var res = wait.for(esUtils.findDocs,'components', search);
you must use wait.forMethod
in order to bind this
to the method owner (esUtils):
var res = wait.forMethod(esUtils,'findDocs','components', search);
Thanks. Turns out the problem was me creating a variable with the same name as the function parameter. You have to love JS.
When you do the npm install, does it already know that fibers is a dependency?
Thanks for a really great utility! I'll pass the word on.
You have to love JS.
+1 to that
If your project is medium or large, I'll recommend you to use TypeScript or if you feel beta-adventurous my own LiteScript
The following normal typos in js will create subtle, hard to catch bugs:
Those three "beauties" make pure-javascript project non-scalable for more than a few lines to make a page dynamic (js original design goal)
If you are planning on a medium to large app, switch now to any type-checked lang generating js. Do not stay in pure-js for medium-size projects, it's a nightmare.
Hi,
My app is node+express. node version 0.10.35. I did the install with:
npm install wait.for npm install fibers (do I need this?)
I did:
I got: