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

[Code organisation] Appropriate place to add middlewares, hooks and decorators in the project directory? #778

Open
2 tasks done
Ashvith10 opened this issue Dec 7, 2024 · 0 comments

Comments

@Ashvith10
Copy link

Ashvith10 commented Dec 7, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

This would've been a nice question to ask on the Discussion tab, but there isn't any for the fastify-cli project, hence I've added this to "Issues".

The project I am working on is a simple URL shortener. perhaps with some extras like authentication, JWT and analytics. But since I want to create a well-polished project for my portfolio, I also want to be able to arrange the internal components in a clean, organized format.

In the default template, there is a plugin directory that contains community-made plugins. Given how there's decorators in the template, would it be proper of me to assume that all the hooks, middle-wares and decorators go in this? Or do I create separate folders?

Should I be concerned about how these hooks, decorators and middlewares are loaded, and in what sequence?

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

No branches or pull requests

1 participant