Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda