NODEJS on simple SQL query fetching from the local database and displaying on local system

前端 未结 2 1673
有刺的猬
有刺的猬 2021-02-06 09:22

I am trying to display data in JSON format on the browser! any suggestions .... i have given my javascript (.js) code below


  1. I am trying to
2条回答
  •  说谎
    说谎 (楼主)
    2021-02-06 09:54

    Add a content-type in your code:

    response.setHeader("Content-Type", "application/json");
    

提交回复
热议问题