Configuration and logger initialization.
Configuration. First, config.yml
is read, then environment variables overwrite the yaml config if they match.
This is where all the main objects are created.
Entities of business logic (models) can be used in any layer. There can also be methods, for example, for validation.
Business logic.
- Methods are grouped by area of application (on a common basis)
- Each group has its own structure
- One file - one structure
- http server with configuration
- standard logger
In order to remove the dependence of business logic on external packages, dependency injection is used.
curl -XPOST 'localhost:8080/v1/users' -d @post.json
curl -XGET 'localhost:8080/v1/users'
curl -XPUT 'localhost:8080/v1/users' -d @put.json