node js project structure, where to put classes

Viewed 1970

So i have a few Classes written in node with es6 and i wounder where would be the right place to put them in a nodejs project

are those modules? because those are already used for other types of code bits.

defiantly not models those are saved for the database.

Right now i'm thinking of warping them into a standalone node module. i looked around but couldn't find any examples of this use case.

Here is the structure i currently have (express app):

/models
    - Holds all the database model definitions
/modules
    - holds one time bits of code, authentication, autherization, email services etc.
/public - client side stuff
    /css
    /js
    /lib - 3rd party front end
/routes - express route defenitions
/views - routes template files
app.js
config.js
package.json

No i have a game running in one of the routes, where should i put that game logic? (i.e classes)

1 Answers
Related