pb_hooks why have multiple *.pb.js files? #4561
Unanswered
VictorioBerra
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I don't know how to answer this. You can ask yourself the same question about your other regular application files. It is up to the users to decide whether they'll put all of their hooks in 1 big file or split them into several. The same apply if you use Go.
Not exactly. You can use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The docs say:
Why would I want multiple files? Why not just put everything in one
main.pb.js
? If i want to break up my code, the docs say I canrequire(
${__hooks}/utils.js)
.The docs also say:
So if I have a single
main.pb.js
all my handlers inside are already treated as a separate "program". Why break them out into their own file?Beta Was this translation helpful? Give feedback.
All reactions