template for strapi and typescript
- Strongly typed - I have defined a lot of strapi api and koa types
- Http decorators - replace the configuration of
routes.json
@Controller('/products') class ProductController { @Post('/') @Policies(['plugins::users-permissions.isAuthenticated']) async create(ctx: KoaAuthenticatedContext<ICreateProduct>) { await strapi .query('product') .create({ ...ctx.request.body, user: ctx.state.user.id }); // ... } }
- Path alias - Only
@/
is supported. You could editresolvePathAlias.ts
for other path aliasimport { IProduct } from '@/typings'; import { Policies } from '@/decorators/http';
- Unit / E2e test ready
- Schema (optional) - defines how the data will be sent over the network
- eslint / ling-staged / husky setup
- Docker setup