This is a Next.js template which can be deployed to Deno.
To deploy to Deno Deploy, it is recommended to build the Next.js application with "standalone" output. Once the standalone application is built, you can deploy your application to Deno Deploy by connecting your GitHub repository or using the CLI:
- Install
deployctl
:
deno install -gArf jsr:@deno/deployctl
- Move the statics not copied into the standalone output directory:
cp -r public .next/standalone/public
cp -r .next/static .next/standalone/.next/static
# Deno needs the explicit .cjs extension to interpret the file as CommonJS
mv .next/standalone/server.js .next/standalone/server.cjs
- Deploy
deployctl deploy --include=.next/standalone .next/standalone/server.cjs
For more information, see our deployment documentation.
To learn more about Next.js and Deno Deploy, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- Deno Deploy - Deno Deploy documentation.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!