Beginning stages HELP - Install and Require Helmet

Tell us what’s happening:

I am quite new to the world of software development and am trying to get my head around this all in order to gain a foothold into the world of Cybersecurity (a massive career change for me). This is going to be a long forum post and I apologise for it.

I basically am looking for help on how to make this all work. Me and ChatGPT have been working hard together to try and configure everything - I’ve ended up installing Git, Github Desktop, Visual Studio, Nano, Chocolaty, Node.js, npm… I think that’s everything.

The first instruction is: " * Clone this GitHub repo and complete these challenges locally."

I’ve cloned it, and it’s on my computer. After trying to run myApp.js (> node myApp.js), and then going to ‘http:// localhost:3000’, I am met with a plain webpage that asks me to fork the same project on Repl.it, which of course I did but it hasn’t really changed anything.

The hints say " * In the package.json file, click the add package button, search for helmet, and click it to add it to your project.". Sorry, where do I open this? ChatGPT says ‘The instructions are referring to an interface provided by Glitch, the platform you’re using, to manage your project’s dependencies.’ I created a small crappy website on Glitch, but how does this ‘boilerplate-infosec’ i’ve downloaded connect to my crappy Glitch website? I’d rather just do it all locally anyway.

Another hint is ‘You can search for packages on glitch somewhere when in your package.json file’. Again… where do i open this? How do i open this? I can’t open this according to ChatGPT - its just part of the myApp.js, i think?

Okay. The realisation has hit me. Maybe I need to do all the courses before this one in order to have a deep understanding of Node and everything else. Maybe this dive into the deep end was a little too ambitious. I’m going to post this post anyway, and I’ll obviously monitor for replies and suchlike, but I believe I may just need more experience in software development in order to actually understand what I’m doing…

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Information Security with HelmetJS - Install and Require Helmet

Hello, So your doing an API, I`ve written one and pushed to the web and I can tell you most of the time everything goes as planned but not always infact I had to rewrite at least once.Try to use VScode without some of the Libraies , also run npm audit fix and get a little feedback. Good luck

Adding NPM Packages

  • 9 months ago
  • Updated

FollowNot yet followed by anyone

NPM is the package manager for javascript, and it’s the world’s largest software registry.

To add a package or module from NPM, your project must have a package.json file. By default the following Glitch starter templates include a package.json:

~glitch-hello-node

~glitch-hello-react

~glitch-hello-eleventy

~glitch-hello-sqlite

Now, here’s how to add an NPM package to your Glitch project:

  1. Open the project in the editor.
  2. In the file view on the left, click on package.json.
  3. Click the + ADD PACKAGE button which can be found at the top of the package.json view.
  4. Use the search box to find the NPM package that you would like to add to your project.
  5. When you find the package that you would like to add, click on it and the project editor will automatically refresh, adding the package selected to your package.json file.

Here’s how to update a package that has already been installed:

  1. When there is an update available for a package that is already being used, an alert will appear next to the + ADD PACKAGE button.
  2. Click the button to review the available updates.
  3. Click on the update that you would like to install.

When adding packages/modules to your Glitch project, remember the following:

  • On Glitch, NPM packages don’t count towards the project disk space limit shown in the project editor App Status tray.
  • There’s a separate 1GB limit for NPM packages and currently, the editor does not provide a status meter to show you how much of this space is being used.
  • For this reason, try to avoid installing unnecessary packages to your project. If you exceed the npm package limit, your project may be automatically suspended by our system. If this happens, you can use the instructions here to address the issue.

where have you found this hints? it looks they are outdated and I can’t find it anywhere

Wow, thank you for your reply. So i’ve added package.json to my Glitch website, and found the “Add Package” button - whereby I added Helmet (albeit having to downgrade the version of Glitch to 3.21.3 so that it would let me move to the next stage).
I’ll continue onwards with this course, and I’m sure i’ll be back in the forum when I encounter my next problem. Thank you so much for your helpful reply!

when I clicked on Get a Hint, I found this small button which allowed me to see previous edits!
Judging by your post, these hints are now outdated? They still seem useful though!

yeah, they are outdated, that’s why they are not visible anymore

it still managed to somewhat help me though - it was all I could find under Hints

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.