Skip to content

Assignments week 1 Oleksandr Starshynov #2

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aleksandrstarshynov
Copy link

No description provided.

@aleksandrstarshynov
Copy link
Author

It looks strange, I know. For some reason, I didn't see PR for first and second commits. So I was able to push the work only with third commit, but here I see all three of then.

@aleksandrstarshynov aleksandrstarshynov changed the title Oleksandr Starshynov w1 Node Assignments week 1 Oleksandr Starshynov Apr 28, 2025
Copy link

@EdwardSmart98 EdwardSmart98 left a 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:

Good luck!

"description": "",
"dependencies": {
"express": "^5.1.0",
"express-handlebars": "^8.0.2",

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')'

"express": "^5.1.0",
"express-handlebars": "^8.0.2",
"node-fetch": "^3.3.2"
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Minor,non-blocking) we are missing the use of the nodemon package

  1. Add it to the dev-dependancies.
    Can you add a line to the "scripts" option showing how you would run nodemon
    Adding your "run" commands to the script's options has two main benefits:
    -> It enables easier collaboration between teammates, as everyone on the team uses the same commands.
    -> It saves time rather than having to remember and write out (sometimes long) commands.

app.post('/weather', (req, res) => {
const cityName = req.body.cityName;
console.log('Received city name:', cityName);
res.send(`You sent: ${cityName}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with an express-handlebars rendered page.

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

Successfully merging this pull request may close these issues.

2 participants