Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.45 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.45 KB

Template: preact-tempo

Run on Repl.it

This template demonstrates using the Tempo remote procedure call framework to add real-time, end-to-end typesafe APIs to a Preact application.

App.tsx is the primary content of the app. It is configured to talk to a pre-hosted greeter service, however, you can change the URL to point to your own service by using the Node.js template.

Code generation is handled by Bebop and you can find an example schema in greeter.bop.

Setup

To create a my-project directory using this template, run:

$ git clone  https://github.com/betwixt-labs/template-preact-tempo.git my-project

Then, install the dependencies:

$ cd my-project
$ npm install
# or
$ yarn install
# or
$ pnpm install
If you wish to generate code from your schemas run:
```sh
$ npm run build:schemas
# or
$ yarn build:schemas
# or
$ pnpm run build:schemas

Development

To start the development server, run:

$ npm run dev
# or
$ yarn dev
# or
$ pnpm run dev