Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nextjs/deploy-deno

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Next.js to Deno

This is a Next.js template which can be deployed to Deno.

Deploying 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:

  1. Install deployctl:
deno install -gArf jsr:@deno/deployctl
  1. 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
  1. Deploy
deployctl deploy --include=.next/standalone .next/standalone/server.cjs

For more information, see our deployment documentation.

Learn More

To learn more about Next.js and Deno Deploy, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

About

Next.js template to deploy to Deno Deploy.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.