Express - Send a page AND custom data to the browser in a single request?

后端 未结 5 851
星月不相逢
星月不相逢 2020-12-23 23:05

How simultaneously to render a page and transmit my custom data to browser. As i understood it needs to send two layers: first with template and second with JSON data. I wan

5条回答
  •  滥情空心
    2020-12-23 23:12

    Check out Steamer, a tiny module made for this this exact purpose.

    https://github.com/rotundasoftware/steamer

提交回复
热议问题