Dhravya / cloudflare-saas-stack

Quickly make and deploy full-stack apps with database, auth, styling, storage etc. figured out for you. Add all primitives you want.
2.97k stars 213 forks source link

Where to create new pages? #34

Closed AntCas closed 1 month ago

AntCas commented 1 month ago

It's been awhile since I've used NextJS, please forgive me if this is a dumb question:

Where do I add new routes?

If I e.g. want to create e.g. localhost:3000/hello where should that go?

I've tried:

/apps/web/hello.tsx
/apps/web/app/hello.tsx
/apps/web/app/pages/hello.tsx
/apps/web/pages/hello.tsx

The Next docs seem to diverge from this project structure https://nextjs.org/docs/app/building-your-application/routing

AntCas commented 1 month ago

Okay, I got it working by making the file:

/apps/web/app/hello/page.tsx

Is it required that each route-handling file be named page.tsx?

Dhravya commented 1 month ago

Yeah! It's just like a normal nextjs project