C
C
CocaColaBear2016-02-13 23:17:04
Node.js
CocaColaBear, 2016-02-13 23:17:04

Modular TypeScript project, is it possible?

Good day to all!
There is a need to implement a web service and the question arose about the modularity of the project. I would like to implement separate pieces of the service as independent modules. For example, a module with database models, a module that works with the database and uses a module with objects, as well as a module with tests that works with these two modules. Something like this :)
In general, the following structure is planned:

Project
--core
----models
----....
----repositories
--tests
--modules
----module.account
----module.foo
----module.bar
- -....
--app

Basically, the app module will interact with the rest of the modules, which will contain all the logic. So that in the future, if some module loads the system, then I would put it into a separate assembly without any problems and would not torment the rest.
Maybe I'm not expressing myself correctly when I say a module, knowing that for a node - each js file is a module. I mean individual small projects.
If possible, please share an example how to use it in TypeScript.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2016-02-14
@CocaColaBear

I mean individual small projects.
Sounds like microservices.
If we are talking about a web application on express, then he knows how to sub-application .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question