-
Notifications
You must be signed in to change notification settings - Fork 0
mprudnik soa #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
mprudnik soa #1
Conversation
…d Money Transfer domain models
georgolden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall:
- There is a job that can be handled independently from other parts of the application - creating instances. Creating instances and DI are jobs that are better kept in one place. Right now it is widespread.
- Configs are only needed during instanciating
- Using
index.jsfiles. It makes things very unclear. If you want to have a collection of routes or a collection of services better to useservices.jsorroutes.jsinstead. And it is better to not handle instances here. - Closure is nice, but try to move as much code as possible out of closure to make it purer. It is generally OK to use closures instead of classes.
georgolden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job overall!
| server: { | ||
| host: process.env.HOST || '0.0.0.0', | ||
| port: Number(process.env.PORT) || 9000, | ||
| instance: {}, | ||
| cors: { | ||
| origin: '*', | ||
| methods: '*', | ||
| allowedHeaders: '*', | ||
| credentials: true, | ||
| }, | ||
| swagger: { | ||
| title: 'Test', | ||
| version: '1.0.0', | ||
| routePrefix: '/docs', | ||
| serverUrl: process.env.SERVER_URL || 'http://localhost:9000', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest moving cors and swagger as separate configs. Better to keep tiny configs
…draw and transfer operations
…updated bus to support session
No description provided.