Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alessiogr/payload-template-bun
Payload x Bun starter template
https://github.com/alessiogr/payload-template-bun
Last synced: 28 days ago
JSON representation
Payload x Bun starter template
- Host: GitHub
- URL: https://github.com/alessiogr/payload-template-bun
- Owner: AlessioGr
- Created: 2023-12-24T23:16:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-03T21:30:25.000Z (about 1 year ago)
- Last Synced: 2024-10-26T02:35:26.028Z (3 months ago)
- Language: TypeScript
- Size: 842 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Payload Blank Template
A blank template for [Payload](https://github.com/payloadcms/payload) and [Bun](https://bun.sh/) - 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:
![Screenshot 2024-01-03 at 21 20 46](https://github.com/AlessioGr/payload-template-bun/assets/70709113/ea0f5afc-a87e-4bac-be0e-54f09a4c7b1a)
## Features of 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## Development
To spin up the project locally, follow these steps:
1. 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)
2. Clone the repo
1. Then `cd YOUR_PROJECT_REPO && cp .env.example .env`
1. Next `bun i && bun dev`
1. Now `open http://localhost:3000/admin` to access the admin panel
1. Create your first admin user using the form on the pageThat's it! Changes made in `./src` will be reflected in your app.
### Docker
This template comes with a Dockerfile which uses Bun to serve your project.
## Production
To run Payload in production, you need to build and serve the Admin panel. To do so, follow these steps:
1. First invoke the `payload build` script by running `bun run build` in your project root. This creates a `./build` directory with a production-ready admin bundle and a `./dist` directory.
1. Then run `bun serve` to run Bun in production and serve Payload from the `./build` directory.## Questions
If you have any issues or questions, reach out to us on [Discord](https://discord.com/invite/payload) or start a [GitHub discussion](https://github.com/payloadcms/payload/discussions).