https://github.com/rocicorp/todo-wc
Todo Web Component Example for Replicache
https://github.com/rocicorp/todo-wc
Last synced: over 1 year ago
JSON representation
Todo Web Component Example for Replicache
- Host: GitHub
- URL: https://github.com/rocicorp/todo-wc
- Owner: rocicorp
- License: other
- Created: 2022-11-22T16:52:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T19:37:56.000Z (about 2 years ago)
- Last Synced: 2025-03-24T08:48:04.962Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://todo-wc.onrender.com/
- Size: 1.29 MB
- Stars: 6
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# todo-wc
This repository contains sample code for [Replicache](https://replicache.dev/). The example uses web-components with a common express server backend. The backend utilizes Express and demonstrates implementations of `push`, `pull`, `poke`, `createSpace`, and `spaceExists` handlers. These are required for the Replicache sync protocol. This library intends to help developers easily experiment with Replicache.
## 1. Setup
#### Get your Replicache License Key
```bash
$ npx replicache get-license
```
#### Set your `VITE_REPLICACHE_LICENSE_KEY` environment variable
```bash
$ export VITE_REPLICACHE_LICENSE_KEY=""
```
#### Install and Build
```bash
$ npm install; npm run build;
```
## 2.Start frontend and backend watcher
```bash
$ npm run watch --ws
```
Provides an example integrating replicache with react in a simple todo application.
## Deploying to Render
A render blueprint example is provided to deploy the application.
Open the `render.yaml` file and add your license key
```
- key: VITE_REPLICACHE_LICENSE_KEY
value:
```
Commit the changes and follow the direction on [Deploying to Render](https://doc.replicache.dev/deploy-render)
/client
/shared
/server
package.json