A blank template for Payload and Bun - a faster alternative to Node.JS - to help you get up and running quickly.
Click on "Use this template" to get started by initializing a new repository from this template:
- Full compatibility with Bun
- Fully-working Dockerfile which uses Bun to install, build and serve your project
- Fully-configured, opinionated eslint and prettier configurations which are used inside of payload core and in my own projects
- Optimal IntelliJ & VS Code run configs
- Optimal tsconfig settings
- New lexical-based richtext editor (Beta) enabled by default
- Everything else is identical to the payload "blank" template, so you have a clean project to get started with
To spin up the project locally, follow these steps:
- Make sure you have bun and node installed (there could be issues when trying to build the project if you only have bun and not node installed)
- Clone the repo
- Then
cd YOUR_PROJECT_REPO && cp .env.example .env
- Next
bun i && bun dev
- Now
open http://localhost:3000/admin
to access the admin panel - Create your first admin user using the form on the page
That's it! Changes made in ./src
will be reflected in your app.
This template comes with a Dockerfile which uses Bun to serve your project.
To run Payload in production, you need to build and serve the Admin panel. To do so, follow these steps:
- First invoke the
payload build
script by runningbun run build
in your project root. This creates a./build
directory with a production-ready admin bundle and a./dist
directory. - Then run
bun serve
to run Bun in production and serve Payload from the./build
directory.
If you have any issues or questions, reach out to us on Discord or start a GitHub discussion.