Skip to content

Instantly share code, notes, and snippets.

@kevboutin
Last active June 13, 2024 18:18
Show Gist options
  • Save kevboutin/3f9cd40a2e6750f9d831e60a5abf8b64 to your computer and use it in GitHub Desktop.
Save kevboutin/3f9cd40a2e6750f9d831e60a5abf8b64 to your computer and use it in GitHub Desktop.
The SampleService class
class SampleService {
constructor(connection) {
this.model = connection.models['sample'];
this.connection = connection;
}
async findById(id) {
return this.model.findById(id);
}
}
module.exports = SampleService;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment