App routing trouble
Answered
NanotechPikachu posted this in #help-forum
Hi.
I am experiencing trouble with the app routing as the
I am wondering if I did something wrong in it. Please help me.
Full code can be found here: https://github.com/NanotechPikachu/Next
I am experiencing trouble with the app routing as the
domain.com/docs/start
sends me a 404 error while I have a file in ./src/app/docs/start.js
I am wondering if I did something wrong in it. Please help me.
Full code can be found here: https://github.com/NanotechPikachu/Next
Answered by jason
In your
So whatever contents you have in your
Folder structure should be something like
docs
folder, you need to create a new folder called start
and a page.js
file in thereSo whatever contents you have in your
start.js
, move that to the new page.js
Folder structure should be something like
app/docs/start/page.js
4 Replies
In your
So whatever contents you have in your
Folder structure should be something like
docs
folder, you need to create a new folder called start
and a page.js
file in thereSo whatever contents you have in your
start.js
, move that to the new page.js
Folder structure should be something like
app/docs/start/page.js
Answer
@jason In your `docs` folder, you need to create a new folder called `start` and a `page.js` file in there
So whatever contents you have in your `start.js`, move that to the new `page.js`
Folder structure should be something like
`app/docs/start/page.js`
So, each page would be a new folder? You can't make direct files to be a page. Am I right?
Yes that's how the app dir structure works and the page would have to be named
page.jsx
or .tsx
with typescriptOh thanks