This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
How to use sqlite or sequelize or typeorm on react side? #14
-
Hi, does someone knows how to properly access sqlite or typeorm or sequelize inside react? |
Beta Was this translation helpful? Give feedback.
Answered by
MPMcIntyre
Nov 19, 2021
Replies: 1 comment 1 reply
-
Hi @leopucci Generally it is not considered good practice to allow node modules to be accessed on the renderer (react) side as it allows for cross-site-scripting (XSS) attacks, however, it is possible by allowing it on the window. You would do this by changing the settings on the webPreferences as such:
so a new window would look like this:
You should then be able to access any node module inside your renderer (react) process kind regards |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
leopucci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @leopucci
Generally it is not considered good practice to allow node modules to be accessed on the renderer (react) side as it allows for cross-site-scripting (XSS) attacks, however, it is possible by allowing it on the window.
You would do this by changing the settings on the webPreferences as such:
so a new window would look like this: