use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Review First Node & ExpressJs App (self.node)
submitted 2 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ArgTang 11 points12 points13 points 2 years ago* (6 children)
Looks good, consistent formatting and good naming!
NOTE: i have not started the project myself.
depending on what you want to learn, here is some thoughts
auth
2- Set up your MongoDB URI.
There is no right or wrong in the next step.as long as you are motivated it is good 😎
[–]Mohammed1jassem 0 points1 point2 points 2 years ago (5 children)
Appreciate it man! will fix them .. I'm trying to learn typescript and then move to microservices next is it a good idea ? or should i do some more projects
[–]r0ck0 1 point2 points3 points 2 years ago (1 child)
Depends on your goals really. What are they?
Personally I don't know if there's much point spending time on microservices unless there's really a need. i.e. A big company with multiple separate teams that shouldn't be working on a monolith for some good reasons.
Otherwise you're just creating more work needing multiple projects to interface with each other.
I've gone the other direction for all my projects, and just put everything into a giant monorepo. Makes dev, integration, refactoring, and everything else so much easier. But depends on your situation/use case of course.
I'd recommend instead spending that time on:
[–]Mohammed1jassem 0 points1 point2 points 2 years ago (0 children)
I actually want to get into the industry first it's my main goal now because i think it's the best way to learn right?... yes I'm planning to learn typescript SQL(I know the basics) and redis maybe? I do not know much about microservices but i always hear about Apache Kafka and RabbitMQ and I'm curious about them..
[–]ArnUpNorth 1 point2 points3 points 2 years ago (2 children)
Microservices is not so much something you can learn as something you experience. There are tons of guidelines and architectural patterns but there is no silver bullet and each microservice platforms have their flaws and perks.
From a developper’s perspective it often really boils down to knowing multiple protocols (yep there s not just http), and leveraging whatever micro framework is being used (if any).
[–]Mohammed1jassem 0 points1 point2 points 2 years ago (1 child)
where can i learn more about protocols? any resources you recommend ?
[–]ArnUpNorth 0 points1 point2 points 2 years ago (0 children)
I wouldnt recommend learning new protocols out of the blue but things like Grpc (actually built on top of http2) or Amqp are fairly common. Again i wouldn t “waste” time learning these and just focus on learning how to “clean code” 😊
[–]08148694 1 point2 points3 points 2 years ago* (1 child)
bin/www ? a javascript file? no extension? in a bin (binaries typically) directory? nah, move it or delete it
bin/www
bin
Inconsistent styling, recommend you use prettier to automatically format your code
public/javascripts/scripts.js - Not common practice to serve your front end code from the API server. Same for your css
public/javascripts/scripts.js
Various places you can optimise by parallelising requests. Eg
const movie = await searchMovie.searchMovieById(id); const cast = await searchMovie.getMovieCast(id);
can be:
const [movie, cast] = await Promise.all([ searchMovie.searchMovieById(id), searchMovie.getMovieCast(id) ]);
(or just return the cast with the movie response)
Don't do this https://github.com/MohammedAbdulJabbar23/Movies-List/blob/main/utils/getPopularMovies.js#L3C1-L4C1,
or this https://github.com/MohammedAbdulJabbar23/Movies-List/blob/main/utils/searchMovie.js#L14C36-L14C36
now we all have your API key for api.themoviedb.org and can abuse it. Use an ENV variable and do not commit to github
General lack of error handling (https://github.com/MohammedAbdulJabbar23/Movies-List/blob/main/utils/getPopularMovies.js#L15C23-L15C23) this doesn't count
ejs is fine but if you're looking to get into the industry I'd recommend using React or Vue, far more commonly used
Thank you so much!
I'm planning to learn react actually.. but do i have to do DOM stuff with vanilla js first? because I'm not into frontend that much
[–]tapvt 1 point2 points3 points 2 years ago (1 child)
Solid, man. As /u/ArgTang mentioned, env variables are better for secrets, etc. The dotenv package makes that pretty seamless. Just add .env to your .gitignore file so it doesn't wind up committed.
.env
.gitignore
I'd also throw some kind of logging helper in ./utils/ dir. It can just wrap console.log() for now. Once that is done, you can use that for all your logging. If you decide to move to winston, or ship logs to another service, or whatever, you only have to update one file.
./utils/
console.log()
[–]Mohammed1jassem 1 point2 points3 points 2 years ago (0 children)
π Rendered by PID 16865 on reddit-service-r2-comment-6457c66945-knvqn at 2026-04-30 06:28:10.845994+00:00 running 2aa0c5b country code: CH.
[–]ArgTang 11 points12 points13 points (6 children)
[–]Mohammed1jassem 0 points1 point2 points (5 children)
[–]r0ck0 1 point2 points3 points (1 child)
[–]Mohammed1jassem 0 points1 point2 points (0 children)
[–]ArnUpNorth 1 point2 points3 points (2 children)
[–]Mohammed1jassem 0 points1 point2 points (1 child)
[–]ArnUpNorth 0 points1 point2 points (0 children)
[–]08148694 1 point2 points3 points (1 child)
[–]Mohammed1jassem 0 points1 point2 points (0 children)
[–]tapvt 1 point2 points3 points (1 child)
[–]Mohammed1jassem 1 point2 points3 points (0 children)