Is that possible to set routes out of the pages folder in Next.js?

Forums Next.JsIs that possible to set routes out of the pages folder in Next.js?
Staff asked 3 years ago

I want to set routing out of my pages folder in my Next.js application, how can I code for it?

Answers (1)

Add Answer
Hit Sutariya Marked As Accepted
Staff answered 3 years ago
  • Next.js has a file-system based router built on the concept of pages.
  • When a file is added to the page’s directory, it’s automatically available as a route.
  • The files inside the page’s directory can be used to define the most common patterns.

=>  So, It’s not possible to set routes out of the pages.

Subscribe

Select Categories