Skip to content

netlify/next-background-api-route

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Background API Routes (Beta)

This is a psuedo-code demo of a Next.js API route running as a Background Function on Netlify.

Find the code in batch-process.js which mocks generating invoices, creating PDFs and sending emails in a synchronous queue.

Enable Background Functions in your Next.js project

Add the following code to any API route in a Next.js project running on Netlify.

export const config = {
  type: "experimental-background",
};

Learn more on the Netlify docs.

About

Run a Next.js API route in the background for up to 15 minutes on Netlify.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published