https://github.com/copongcopong/pb-baker
PocketBase application initializer in Bun
https://github.com/copongcopong/pb-baker
bun pocketbase
Last synced: 9 months ago
JSON representation
PocketBase application initializer in Bun
- Host: GitHub
- URL: https://github.com/copongcopong/pb-baker
- Owner: copongcopong
- Created: 2024-11-15T10:29:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T10:17:27.000Z (over 1 year ago)
- Last Synced: 2024-12-16T11:24:47.731Z (over 1 year ago)
- Topics: bun, pocketbase
- Language: TypeScript
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PocketBase Baker
PocketBase (v0.23.xx, Extend with JavaScript) project initializer in Bun
- designed for PocketBase v0.23.xx and Bundler by Bun (https://bun.sh)
- see Release Notes: https://github.com/pocketbase/pocketbase/releases/tag/v0.23.0
- See Docs: https://pocketbase.io/docs/
- see https://pocketbase.io/docs/use-as-framework/
- https://pocketbase.io/v023upgrade/jsvm/
- https://pocketbase.io/jsvm-rc/
## Stack Structure
- `/app/**` contains TS files that will be loaded as JSVM libs and hooks (CJS bundled)
- `/app/app.build.ts` - build script for pb_hooks
- `/app/lib.build.ts` - build script for reusable JSVM libs inside pb_hooks
```
const lib = require(`${__hooks}/app/lib`);
```
To use this stack
- use degit; https://github.com/Rich-Harris/degit
```bash
bunx degit copongcopong/pb-baker
```
- or use as template
To install dependencies:
```bash
bun install
```
To run for the first time (will get pocketbase v0.23.1, then create Superuser)
```bash
bun run initialize!
```
To start local development (auto reload and builds pb-related hooks and jsvm libraries):
```bash
bun run dev
```
To build pb-related hooks and jsvm libraries:
```bash
bun run build
```
This project was created using `bun init` in bun v1.1.35. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.