I’ve finished the webapp half of my website in meteor and am thinking about making the homepage in gatsby (where people can buy accounts for the webapp) for its speed. I noticed on a gatsby.js build it uses socket-io, is it possible to somehow send data to the meteor web app/database?
Basically when a customer purchases an account they will get a username and password which they can access the webapp, if gatsby can somehow send data through a form to meteor accounts, or even mongo db that would be next level
If anyone can let me know if this is possible and whats needed it would be very very amazing. Thank you in advance
Gatsby is static HTML so you would need to have a serverless function to handle this (or use Netlify or similar). Be sure to salt and hash the password as per the way Meteor Accounts does it in order to allow the user to log in (i.e don’t be sending the password in it’s raw format).
Edit - Actually, I suppose you could simplify and technically use Axios/Fetch to create the account via a webhook, eliminating the need of a serverless function.
Taking the username and password you could send that to Meteor to create the account.
I have personally thought of doing similar - but if/when I do go down this path, rather than allowing account creation on Gatsby, I will simply send them to the Meteor app at the time the user decides to sign up/log in.