-
Notifications
You must be signed in to change notification settings - Fork 6
Assignments week 1 Ilia Bubnov #1
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A strong first attempt, and your newly made API requests return exactly what is required.
I have requested the following changes:
- You need to use the express-handlebars templating package.
- I would recommend checking out the "Usage" paragraph here https://www.npmjs.com/package/express-handlebars for advice on how to set this up.
Good luck!
import express from 'express'; | ||
|
||
const app = express(); | ||
const port = process.env.PORT || 3000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use of environment variables system
"type": "module", | ||
"dependencies": { | ||
"express": "^5.1.0", | ||
"express-handlebars": "^8.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you have imported the handlebars templating system, you have not used it in the assignment, please implement/use this for templating/displaying the response to the root ("/") GET request. as a hint, your return line should look like 'res.render('home')'
"node-fetch": "^3.3.2" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^3.1.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a line to the "scripts" option showing how you would run this.
Adding your "run" commands to the script's options has two main benefits:
-> Easier collaboration between teammates, as you will all be running the same command.
-> It save time than having to remember and write out (sometimes long) commands
Thank you for your feedback. I truly thought that we would start applying handlebars later on. I have removed the deprecated dependency and used the given feedback. |
No description provided.