Replies: 3 comments 1 reply
-
I've seen this now: https://socketsupply.co/guides/# |
Beta Was this translation helpful? Give feedback.
-
Hi @rorymcd98 |
Beta Was this translation helpful? Give feedback.
-
Thank you for the reply @rorymcd98 However this is not at all safe! At least not for my use case. Could someone from socketsupply team chime-in and clarify how can one use sqlite as a relational database from within the "socket app"! PS: Sorry just saw the code snippet using socket:fs ! Well in such case you are using it from within a "native app" and it should be fine. But this feels hakish to me and I am sure the socketsupply can do better ❔ |
Beta Was this translation helpful? Give feedback.
-
The guide guides on socket-supply.co/guides recomments SQL-Lite or level db for having some level of persistent storage. The standard sqlite3 npm uses node's process variable. Because this is not available a number of errors exist when running in the browser.
Is there some simple approach to make process available (and populated with (e.g) environment variables) for a frontend app? Or should I be creating a server that runs in the socket runtime for anything that requires node/process/whatever else?
I've been trying to achieve the latter (runtime server) approach - initially just making a basic "Hello world" server which by frontend can ping. Unfortunately the
socket.ini
"cmd" setting does not appear to be playing nicely - I have tried the following but have seen no success, even with the --verbose flag I can't tell if this command is ever running. Am I doing something wrong?:This is with
server.js
being copied into dist, which eventually becomes build directory (I can verify this witha screenshot):Beta Was this translation helpful? Give feedback.
All reactions