Errors with node-mssql in a webpack-bundled React app

前端 未结 1 1796
夕颜
夕颜 2021-01-20 04:22

My React app fails to build whenever I try to use the node-mssql library. It\'s important that I do this on the client side, since I have to serve this app from an old IIS s

相关标签:
1条回答
  • 2021-01-20 04:30

    MSSQL server connection libraries are not client-side javascript libraries. There is absolutely no way you can make TCP SQL connections from a web browser, even if you wrote your own library.

    For security reasons, you would never want to allow client-side access to the SQL Server. You need to spin up server-side environment (e.g. Node/Express) to expose an API to the client applications.

    0 讨论(0)
提交回复
热议问题