Skip to content
New issue

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

Styling: If you don't want to type the handler functions twice #47

Open
Joepock123 opened this issue Apr 17, 2020 · 0 comments
Open

Styling: If you don't want to type the handler functions twice #47

Joepock123 opened this issue Apr 17, 2020 · 0 comments

Comments

@Joepock123
Copy link

Styling: If you don't want to re-write all of your handler variables twice in the server.js file you can import the module and in the route write server.get("/books/non-fiction", books-handler.getAllNonFictionHandler);

Destructuring is cool but not sure how it adds value here? DRY BABY!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant