I used Gatsby on a recently launched static page using React and D3 (available in German: http://www.kinderbetreuungsatlas.at/). Due to the positive experience I want to use Gatsby for the homepage of my coding workshops for kids. I currently use a Meteor app to manage the registrations for these workshops (and for other projects as well).
Is there a way to use something simple like Meteor.call from the static page for submitting the information from the contact form?
AFAIK I need a DDP client library, there are plenty of them on NPM, but no official one. The best would be a React HOC, that could be used for subscriptions as well – for later extensions.
Do you have any recommendation? Could be Fusion the solution for this problem?
I know, I could expose a REST API, but – as said before – I really like the simplicity of Meteor.call.
Your library seems to be too complex for this particular problem (at the first sight). I don’t plan to use redux.
What I liked in the concept of Fusion was the fact to use it conditionally. I’d like to start the DDP connection only for one call, not for every visit on the homepage.
Actually, starting a connection conditionally is also possible with ddp-redux, but if you’re not interested in redux at all then it’s not an option anyway.
If it’s just for one call, then I would use a basic HTTP request instead. Keep in mind that whatever DDP client you will be using it will come with a lot of overhead, e.g. because of EJSON dependency. So if you care about your js bundle size go for the simplest possible solution.
I’ll host the site on the webspace of my local provider. It doesn’t provide such a form handler (but I could implement one using PHP ).
Of course, using Meteor for form handling only would be disproportionate. But over the time, there’ll surely be additional integrations, e. g. a live display of the free seats in the workshops.
Meteor is function-wise an 18-wheeler, but the developer experience makes it easy to treat it like a go-kart
There are many benefits to using Netlify. And it’s free.
Netlify is an ultra performant platform for static sites.
Features include
Global CDN
Ultra Fast DNS
High Availability
Atomic Deploys
Instant Cache Invalidation
Security
Scalability
Automation
Oh did I mention free one-click SSL, form submission hooks without running a huge, performance killing framework like Meteor; and GitHub integration.
And it’s free.
If you add Meteor (SPA framework) you’re going in the polar opposite direction of a static site. Something like Vue might be a better tech choice. As a progressive framework, it might be a more naturally fit for this kind of evolution from static site to SSR or SPA application. You can develop a Gatsby-like static site with Vue/NUXT.
He wasn’t saying he wanted to put Meteor on the static site. He already has a Meteor app, and now he wants the static site to communicate with it. Meteor-rest seems perfect for this.
Maybe, I’ll try netlify, as it provides SSL (this was the killer argument for me, as my provider doesn’t provide SSL for free).
As I already run a Meteor application (on a dedicated server), I will put this method there instead of setting up an additional application. Furthermore, GraphQL seems to need more overhead than REST, even it seems to fit well into the Gatsby architecture, as it used during build-time to collect all the data.
but why use meteor for static website… it’s like driving your kids to school using a TIR. anyway, you mentioned there is no official package. Try searching urigo’s repo on github. specifically meteor client bundler.
You’re right, using Meteor would not be reasonable for a static site, but as I’ve written above, I just want to do something like Meteor.call from a static page – like I am used to do it from React Native or Unity.