ExpressJS Pass variables to JavaScript

后端 未结 5 1421
谎友^
谎友^ 2021-02-07 12:35

I am completely lost on this; I am using NodeJS to fetch a JSON and I need to pass the variable to my page and have JavaScript use the data.

app.get(\'/test\', f         


        
5条回答
  •  面向向阳花
    2021-02-07 13:23

    I know I'm a bit late to the party, but I actually wrote a module (JShare) a few months ago to solve this exact problem. Check it out: https://npmjs.org/package/jshare

提交回复
热议问题