Skip to content

Project structure #3

@brnrdog

Description

@brnrdog

So we're building an express app, which provides a nice API and is flexible enough to let us build on top of whatever structure we want. So, how our structure is gonna be?

I was checking the Buse project, which @luizrogeriocn made a nice work modularizing the app in the following way:

|- app
|   |- models
|   |   |- geo_position.js
|   |   |- person.js
|   |   |- ...
|   |- routes.js
|- config
|   |- config.js
|   |- database.js
|- test
|   |- ...
|- index.js
|- server.js

For this project, I think this structure is more than enough. It gives us some file modularization and yet it's simple. For a larger project, we can elaborate to make it more sophisticated.

I've also been checking this template. It separetes the models with its specific routes. Worth to check it out.

So, what do you say?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions