/payload-3.0-movies

Movies example with Payload 3.0

Primary LanguageTypeScript

Payload 3.0 Movies Example

This repo showcases showcases Payload 3.0, it's support for Postgres (as well as MongoDB), it's asset management system and admin dashboard, as well as simple deployment to Vercel.

Quick Start

Deploy with Vercel

Local Development

Create the local development environment file.

cp .env.example .env.development.local

Run the script start database script, which uses docker to spin up Postgres.

./start-database.sh

Note: You can change the connection string in the .env.development.local file to point to a different database, you will also want to change it in the start-database.sh script.

Create a payload secret, perhaps using openssl rand -base64 32 and set that value in the .env.development.local file.

Get a TMBD API key and add it to the .env.development.local file. You will need an account on TMDB. It's all free.

Install the dependencies.

pnpm i

Create the database migration file.

pnpm run payload migrate:create initial

Run the migration to create the database tables.

pnpm run payload migrate

Start up the development server.

pnpm dev