Demo app demonstrating use of the PowerSync SDK for Web together with Supabase.
Prerequisites:
- To run this demo, you need to have properly configured Supabase and PowerSync projects. Follow the instructions in our Supabase<>PowerSync integration guide:
- Run
pnpm install - Create a
.envfile by copying the templatecp .env.template .env - Populate the
.envfile with PowerSync and Supabase details - Run
pnpm watchto build application and check for code changes - In a new terminal run
pnpm startto start the server - Go to http://localhost:8080
- The Angular development server (
pnpm serve) doesn't support service worker applications - For Angular, workers need to be configured when instantiating
PowerSyncDatabase. To do this, copy the worker assets (pnpm powersync-web copy-assets -o src/assets- done automatically in this demo for serving and building) and ensure the worker paths are specified (example here).
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.