Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views: The view index.ejs should be rendered by indexRouter instead of app.js #29188

Open
3 tasks done
RushilJalal opened this issue Dec 13, 2024 · 0 comments
Open
3 tasks done

Comments

@RushilJalal
Copy link
Contributor

Checks

Describe your suggestion

Here's the screenshot for understanding:

image

I believe if we're trying to render a view for index, it should be done in the indexRouter file instead of app.js, which can lead to cluttered code if all the views for all the routes are rendered in the main file app.js.

I am just a beginner so correct me if I'm wrong. Thanks!

Path

Node / JS

Lesson Url

https://www.theodinproject.com/lessons/nodejs-views

(Optional) Discord Name

willyWonka

(Optional) Additional Comments

I would love to contribute if possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant