Forum Discussion
SPFx and SQL in Azure
- Jul 11, 2017
Since there's no native SQL connectivity from JavaScript, which makes sense (no way to hide connection details), you'd be looking to have a service, which provides the needed access. This could be implemented as WebAPI or as Node.js application hosted in Azure.
You'd secure the call from SPFx to WebAPI using Azure capabilities and then provide needed operations towards your SQL Azure database (or any other service) from the WebAPI.
See following for additional details on how to secure the traffic between SPFx solution and WebAPI - https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/connect-to-api-secured-with-aad.
Since there's no native SQL connectivity from JavaScript, which makes sense (no way to hide connection details), you'd be looking to have a service, which provides the needed access. This could be implemented as WebAPI or as Node.js application hosted in Azure.
You'd secure the call from SPFx to WebAPI using Azure capabilities and then provide needed operations towards your SQL Azure database (or any other service) from the WebAPI.
See following for additional details on how to secure the traffic between SPFx solution and WebAPI - https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/connect-to-api-secured-with-aad.
What about SPFx web part that Posts and Gets to and from Cosmos DB?
They have an express example that we can probably use to create the connection but if someone already did something similar, it will be easier.
Thanks