Services
Use services for messages & working with db
What is service?
You can use a service to create messages and work with the db, and your code will be cleaner
Export message to service
We recommend that you describe the message you will use in the controller in the service and retrieve it with this.service.message
app.service.ts
app.controller.ts
Working with db
We recommend to work with db in controllers. It will be more modular. If you'll use database work in services, we will provide you with a good work with it. You can read more about it here
Last updated