We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
since you already have an empty file for home, I would move the callback for the "/" route handler to this file.
week8-jach/src/controllers/index.js
Lines 12 to 14 in 84ec974
change this to
router.get("/", getHome)
or similar, where getHome would be imported in from home.js
you can do the same for
Lines 18 to 60 in 84ec974
and abstract the callbacks into separate files.
leaving your index.js cleaner and looking like this
router.get("/",getHome) router.post("/create-user",createUser) router.get("/presents",getPresents)
where getHome, createUser and getPresents are functions imported in. refer to the express workshop if you need help with this 👍 😄
The text was updated successfully, but these errors were encountered:
#38
by dan is the same issue btw
Sorry, something went wrong.
Refactored home page rendering
450e8de
relates #38 #35
Refactored create user post request into seperate file
61cbe6f
ab8a693
AlexandraOM
No branches or pull requests
since you already have an empty file for home, I would move the callback for the "/" route handler to this file.
week8-jach/src/controllers/index.js
Lines 12 to 14 in 84ec974
change this to
or similar, where getHome would be imported in from home.js
you can do the same for
week8-jach/src/controllers/index.js
Lines 18 to 60 in 84ec974
and abstract the callbacks into separate files.
leaving your index.js cleaner and looking like this
where getHome, createUser and getPresents are functions imported in. refer to the express workshop if you need help with this 👍 😄
The text was updated successfully, but these errors were encountered: