Answer the question
In order to leave comments, you need to log in
How can I force Browsersync to be injected into the JSON response of an ExpressJS server?
Hello. I am developing a REST API server using Express. I also use Gulp, Nodemon and Browsersync to speed up development.
What's the problem : Browsersync doesn't want to be injected when I respond with res.json(data)
. But it works fine when I do this:
res.send("<html><body>" + JSON.stringify(data) +" </body></html>")
<body>
, but how do I make it add the script to JSON? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question