rsnext/examples/cms-payload
Steven a3aa6590ff
chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062)
We already had `domains` as "not recommended" but this PR marks it as "deprecated" and prints a warning if its detected.

I also updated all examples to switch from `domains` to `remotePatterns`.
2023-10-19 20:24:48 +00:00
..
app examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
components chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062) 2023-10-19 20:24:48 +00:00
css examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
pages/api examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
payload chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062) 2023-10-19 20:24:48 +00:00
public examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
utilities examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
.env.example chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062) 2023-10-19 20:24:48 +00:00
.gitignore examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
.npmrc examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
cssVariables.js examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
next-env.d.ts examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
next-env.scss.d.ts examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
next.config.js chore(next/image)!: mark domains as deprecated in favor remotePatterns (#57062) 2023-10-19 20:24:48 +00:00
package.json examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
payload-types.ts examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00
README.md chore: NextJS -> Next.js (#55961) 2023-09-25 14:53:11 +00:00
tsconfig.json examples: Add new cms-payload example. (#49616) 2023-06-16 07:32:51 -07:00

Next + Payload Serverless Demo

This is a demo showing how to utilize @payloadcms/next-payload to deploy Payload serverlessly, in the same repo alongside of a Next.js app.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example cms-payload cms-payload-app
yarn create next-app --example cms-payload cms-payload-app
pnpm create next-app --example cms-payload cms-payload-app

Deploy it to the cloud with Vercel (Documentation).

The only thing you need to do to deploy to Vercel is to ensure that you have a Mongo Atlas database connection string and an S3 bucket (if desired).

Fill out the same environment variables that are shown in the .env.example with your own values, and then you're good to go!

Developing locally

To develop with this package locally, make sure you have the following required software:

  1. MongoDB
  2. Node + NPM / Yarn
  3. An S3 bucket to store media (optional)

Getting started

Follow the steps below to spin up a local dev environment:

  1. Clone the repo
  2. Run yarn or npm install
  3. Run cp .env.example .env and fill out all ENV variables as shown
  4. Run yarn dev to start up the dev server

From there, you can visit your admin panel via navigating to http://localhost:3000/admin. Go ahead and start working!