We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Usage section tells:
polka() .use(one, two) .get('/users/:id', (req, res) => { console.log(`~> Hello, ${req.hello}`); res.end(`User: ${req.params.id}`); }) .listen(3000, err => { if (err) throw err; console.log(`> Running on localhost:3000`); });
Where the listen provides a handler which expects err.
listen
err
.listen(3000, err => {
The thing is, err will be always undefined as listening event provides nothing. listening event documentation: https://nodejs.org/api/net.html#net_event_listening
undefined
listening
The text was updated successfully, but these errors were encountered:
fix: remove err param from .listen() callback;
.listen()
0424bb5
- Closes #120, #163
2ce10df
No branches or pull requests
The Usage section tells:
Where the
listen
provides a handler which expectserr
.The thing is,
err
will be alwaysundefined
aslistening
event provides nothing.listening
event documentation: https://nodejs.org/api/net.html#net_event_listeningThe text was updated successfully, but these errors were encountered: