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 2 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 2 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.

Apko message send nai kar saka isliye yha pe comment kiya

aapka video merge vale project me muje ye err aa rhi hai..kya karu??…@Hit bro.

Error: spawn D:\S.M.Patel\Node_projects\VideoEditing\ffmpeg\bin\ffprobe.exe ENOENT

Sagar Gajera replied 2 years ago

Subscribe

Select Categories