Is it possible to use local js files in Bruno? #657
-
I am trying to use a simple js file from the request folder and use it in the script section, but the file is not loaded. In the same way, I would like to create another script outside Bruno that can log the requests and responses, just calling the function from a js file, how the picture shows. Is it possible to execute this strategy? |
Beta Was this translation helpful? Give feedback.
Answered by
helloanoop
Oct 18, 2023
Replies: 2 comments 1 reply
-
This is possible in Bruno :) const helloWorld = require("./test");
helloWorld(); You can also checkout #385 for some script inspirations. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
iuri-aramos
-
Thank you @helloanoop, it has worked. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is possible in Bruno :)
I think there is a typo. Your pre-request script should be more like
You can also checkout #385 for some script inspirations.