FCC Stock Price Checker Wrap Up?

Hi. I thought I was progressing along Python, data science learning path until I hit info sec and stock price checker project. A slightly stressful , compressed learning experience as I had started a few JavaScript modules a few years ago before a hiatus.
I am refining working code using Mongo cloud Atlas DB connection but two newbie questions that I didn’t find clear answers to.

Tell us what’s happening:

  1. Should the node.js automatically start remotely? I sent the active link to several acquaintances to test and it won’t run in their browsers unless I have repl.it running and listening. When running they are able to make input without issue. Is this normal? Is there special code in the FCC ‘autograder’ to start it from active link? I found some forum references to a daemon to keep running but don’t know if applicable for remote launch.
  2. Had to learn about ENV to hide sensitive DB credentials. It appears NODE_ENV can be left set to prod., dev., or test. Does it matter if you leave perpetually in ‘test’ vs returning to default ‘production’? It appears it can be left set to prod., dev., or test.


Your code so far
Link to api.js on repl.it: https://repl.it/@Grayman1/boilerplate-project-stockchecker#routes/api.js

Your browser information:

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

Challenge: Stock Price Checker

Link to the challenge:

the infosec cert is there because it also has python projects to complete, but you can jump over it and go to the Machine Learning with Python cert if you want

the suggested order is from top to bottom for all certs, and in the upper half there is the inteoduction to JS and Node

No, the server should not automatically start. Ideally, you could click the RUN button on the Repl, and leave it running. However, I have noticed my Repls stopping, once I leave (close the browser) for a while. This is what most campers do, for the tests - start the Repl, run the fCC tests, stop the Repl once they pass. I do not have any insight into daemon keeping it running.

Unless you plan on using the app in a production sense (to do something useful), there is no issue with setting and leaving NODE_ENV=test. For the freeCodeCamp tests (excluding the Python projects), NODE_ENV must be set to test , as some of the fCC tests check if the app (unit and functional) tests are passing.

Hope this clarifies.

Thanks for the advice. Definitely need a deeper dive. Crammed YT videos for Mongo and Node to get started; recent Node lessons within FCC environment seemed to take me to subscription environments. I will likely fill in some gaps and return.

Thanks for the feedback. First comment explains why my code wasn’t consistently running through checker, after passing, when making minor stylistic mods. Wasn’t consistently running.

do you mean repl.it? it needs an account, but it’s free - it’s also same environment recommended for python

Hi. Re: Codedamn. I couldn’t really use as beginner’s learning path with limited time in free option.
FCC projects, video lessons distributed across multiple cloud environments, seem to move from time to time; along Python focused path I already have accounts on 5 cloud environments. For projects, I’m sure I can clone and condense into 1-2 environments.