question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why not app.use(generator) ?

See original GitHub issue

Like this

app.use(function *(next) {
    var start = new Date;
    yield next;
    var ms = new Date - start;
    console.log('%s %s - %s', this.method, this.url, ms);
});

Is there a reason for that?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
tjcommented, Aug 23, 2013

maybe we’ll see it changed:

screen shot 2013-08-22 at 6 33 44 pm

0reactions
tjcommented, Aug 23, 2013

another nice thing about the dispatcher approach though is we can remove downstream, since we can check that it’s reached the furthest downstream middleware

Read more comments on GitHub >

github_iconTop Results From Across the Web

app.use() requires a generator function · Issue #207 - GitHub
So I believe the problem is that, when there is no get , post , etc, just some use , then 6.0.0 doesn't...
Read more >
Why am I getting error "requires a generator function"
Here is the error I get when starting node. Any clues? AssertionError: app.use() requires a generator function at Application.app.
Read more >
Code Generation on Mobile Devices for Mobile Apps
A desktop will be of no use without a generator when power goes out, and a laptop will run out in 3 to...
Read more >
How to Use Facebook Code Generator for iPhone, iPad or ...
In this video I'll show you how to use Facebook Code Generator for an ... Choose to either save or not save this...
Read more >
Honda My Generator on the App Store - Apple
Honda “My Generator” smartphone application is for use only with Honda generators equipped with Bluetooth® technology. The application is able to do the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found