Skip to content

Conversation

@marcorichetta
Copy link
Contributor

@marcorichetta marcorichetta commented Aug 22, 2025

Description

Status

  • Moved content from legacy Nodejs week 2/3 => Backend/Nodejs week 1/2

Content check or update

  • Week 1

    • README
    • Learning goals
    • Preparation
    • Session-plan
      • Move teacher code to module-materials
      • Session outline -> link reading and excercises together
      • Time the session parts
      • Update the SQL related bits from MySQL to Sqlite
    • Assignment
  • Week 2 -> Work moved to [Backend] NodeJS - week 2 #199

  • Generic

  • Review for traces of MySQL

  • Review assignments for outdated material

  • Remove teach-live-coding references

  • Remove homework upload references

  • Remove nodemon references

  • (Optional) Review relevance to Foundation/intro-to-nodejs, link overlapping material if exists

Proposal overview

Image

https://github.com/HackYourFuture-CPH/programme/blob/main/contributing/proposals/js-node-restructure.md#backend-specialisation

@marcorichetta marcorichetta requested a review from a team as a code owner August 22, 2025 17:03
@marcorichetta marcorichetta linked an issue Aug 22, 2025 that may be closed by this pull request
@marcorichetta marcorichetta marked this pull request as draft August 22, 2025 17:03
Copy link
Contributor

@magdazelena magdazelena left a comment

Choose a reason for hiding this comment

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

some comments based on my discovery with #159 and past experiences.

I like the structure though, especially in the session materials!

@magdazelena magdazelena force-pushed the 58-create-backend-nodejs-module branch 2 times, most recently from 6fbceaa to a44dd31 Compare September 9, 2025 19:37
@adamblanchard
Copy link
Contributor

@marcorichetta to review the progress here and summarise what's left, before we continue

Comment on lines 42 to 46
For more research, check the following resource:

- [What is REST: a simple explanation for beginners](https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f)

- [@NoerGitKat (lots of web app clones/examples to learn from)](https://github.com/NoerGitKat)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Candidate for preparation.md

Comment on lines 139 to 144
First, you should demonstrate the SQL injection and that it for instance is possible to drop/delete the `contacts` table with the `sort` query parameter.
You can for instance demonstrate this with a screen recording and include it in the PR description.

After having demonstrated the SQL injection vulnerability, the goal is then to fix the issue by updating `app.js`.

**Hint:** the `multipleStatements: true` part in the configuration indicates how you can use the vulnerability. The configuration should not be changed though, the SQL injection should be fixed by making changes in the `/api/contacts` route.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This made sense for MySQL. Knex with sqlite doesn't accept that config.

We should review how to replicate or change the way of showing an SQL injection. There's something similar in the backend/databases module

@marcorichetta
Copy link
Contributor Author

@marcorichetta to review the progress here and summarise what's left, before we continue

Done!

  • I updated the files I reviewed on the description of this PR
  • I also left comments on the things I saw need some changes. Not to say there aren't more things to do.
  • Both READMEs are mostly good but have some TODOs left

@magdazelena magdazelena force-pushed the 58-create-backend-nodejs-module branch from 0caae9d to c5c14e6 Compare October 6, 2025 18:18
@magdazelena magdazelena mentioned this pull request Oct 6, 2025
12 tasks
@magdazelena magdazelena changed the title Create node.js module for backend specialism [Backend] create node.js module Oct 6, 2025
@adamblanchard adamblanchard changed the title [Backend] create node.js module [Backend] NodeJS - week 1 Oct 7, 2025
@magdazelena
Copy link
Contributor

@adamblanchard I have two doubts to clear. I went according to the plan: https://github.com/HackYourFuture-CPH/program/blob/fe5da8a4eef91d759ed80b31d9d7b1bcd8be5d83/contributing/proposals/js-node-restructure.md

  1. I moved POST to week 2, as per plan. The POST is, however, covered in the foundation backend module. I did not remove the POST references from the assignment yet, so I can either do that or bring the POST back to this module :)

  2. Authentication is very much neglected in this module. I added a little note on "explain authentication", but it is such a vast and important topic that I wonder if it should not be better covered - is that a part of later modules? The example in the materials is also quite simplistic, which is great for begginers but perhaps an explanation would be a plus here. But idk, I tend to overexplain in the materials, so perhaps it is fine to leave it as is :D hence the question

I think I'm most doubtful about the above two, otherwise the week 1 could be up for review :)

@adamblanchard
Copy link
Contributor

@magdazelena Hey! I think POST can live in week2. Since this week seems like the main focus is learning express, that makes sense.

Thought about assignment: I think it could be ok to leave POST there? They did cover POST previously, and I think assignments should not only practice what they learned in the session but also stretch them to apply things they know in new ways. We could help by linking to some documentation, or writing some more hints in the assignment. What do you think?

I can't really judge whether auth should be covered more. I do appreciate it's an important and big topic though, that is easy to "not understand". Also recognise it's one of those topics that can come up in interviews. If you think we could spend more time on it, we could move the postman stuff all to week2? Then it's more unified with the other POSTMAN stuff we are covering there, rather than splitting their focus for the last 30 mins here. And we'd have some more time here to dive into it?

Either way, might be a good idea to move postman all to week2 anyway?

I will review the rest of the PR in the meantime :)

@magdazelena
Copy link
Contributor

@adamblanchard I think since we do mention auth already in the module, it could make sense to make it more extensive... I think it will depend on the mentor, but in general at least a mention of different methods could be beneficial here - and then moving POST and Postman to week 2.

I agree with the assignment, it has been already explained after all :)

@adamblanchard adamblanchard marked this pull request as ready for review October 28, 2025 09:06
@adamblanchard
Copy link
Contributor

Merging this for now, this PR appears to be complete. It's also getting a bit big! Work will continue in #199

@adamblanchard adamblanchard merged commit 761a7b4 into main Oct 28, 2025
3 checks passed
@adamblanchard adamblanchard deleted the 58-create-backend-nodejs-module branch October 28, 2025 09:07
@adamblanchard adamblanchard restored the 58-create-backend-nodejs-module branch October 28, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Create Node.js module

4 participants