Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Nodejs recommended clean folder structure

I'm planning a medium-sized node project because I have a java background, grade did everything for me regarding the general structure of the project. And as far as i already know, the MVC pattern is not very common in Node projects. Now i am wondering how i can structure my project.

I already have some files: Server-related: -server.js just the app.listen(port, callback) function -app.js in here are all expressjs settings like app.use(xyz)

client-related: my public files index.html, index.css and some client side javascript

And some business logic: my project does some heavy calculations on the server side and just displays the results in the index.html, so my business logic contains the most files. For example: a PriorityQueue.js File, that is just a library class for a PriorityQueue Implementation. Furthermore I have implemented some other Data structures and Algorithms.

I do not have many routes, just /error and /home

My Questions is now: How do i structure all these files, to have a clean and beautiful project structure? I already read the AirBnB and the Google JS Style Guide, but they don't say anything about the project structure.

Your help is much appreciated! Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I generally create a server.js main file and routes/, controllers/ and services/ and models/ subdirectories. If I have a "files" service I will then create files.route.js, files.controller.js, files.service.js and files.model.js.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!