Netlify
Netlify is an application deployment platform.
Electric and Netlify
Netlify is a great choice for deploying client-side web apps that use Electric.
Need context?
See the Deployment guide for more details.
Deploy your app
Create your app, connect it to Netlify and deploy via git push
.
Connect to Electric
You need Electric (and Postgres) running somewhere else
The easiest way is to use the Electric Cloud. Or see the Deployment guide.
Copy the URL to your Electric instance and use it when syncing data into your app. E.g.: by setting an environment variable and using it in your code:
tsx
const ELECTRIC_URL = process.env.ELECTRIC_URL
const stream = new ShapeStream({
url: `${ELECTRIC_URL}/v1/shape`,
table: 'items'
})
See the Client docs for more information.
Example
Deploy example app
Deploy our standalone-basic-example app using the form below: