Skip to content

Instantly share code, notes, and snippets.

View moutehard's full-sized avatar
🎯
Focusing

Justin Wauquier moutehard

🎯
Focusing
  • Belgium
View GitHub Profile
@moutehard
moutehard / _readme.ts
Last active August 5, 2022 02:46
NestJS & Sequelize - Pagination dto and decorator
// Copy the two files bellow (pagination.decorator.ts & paginationParams.dto.ts)
// Use it as
// SERVICE :
public async findAll(pagination: PaginationParams): Promise<Post[]> {
return await this.post.findAll(pagination);
}
// CONTROLLER :
async findAll(@GetPagination({ limit: 5 }) pagination: PaginationParams): Promise<Post[]> {
@moutehard
moutehard / App.tsx
Last active June 29, 2022 18:42
NextJS Action Cable Context - Usage with TypeScript
return (
<CableProvider url="<Your action cable URL>">
<Component {...pageProps} />
</CableProvider>
);