@bonnet-ltd/starter
v2.0.0
Published
This will help you kickstart your next service.
Downloads
143
Keywords
Readme
Bonnet Service Starter
This will help you kickstart your next service.
Current NX VERSION - 18.0.8
WARNING - this package is not compatible with any services that have infrastructure manually set up
Getting Started
Create the NX workspace npx [email protected] bonnet-ltd --preset=ts
Rename your folder mv bonnet-ltd SERVICE_NAME-workspace
Install required packages npm install --save-dev @nx/[email protected] @nx/[email protected] @bonnet-ltd/starter
Available Scripts:
npx nx generate @bonnet-ltd/starter:init
- initialises barebones of your new service (semaphore, terraform config). This needs to be always run at the beginning of your project.npx nx generate @bonnet-ltd/starter:api
- this will create trpc, api and client packages as well as add it to terraform and semahorenpx nx generate @bonnet-ltd/starter:pubsub
- this will create pubsub api and pubsub handlers packages as well as add all the neccessary config to terraform and semahorenpx nx generate @bonnet-ltd/starter:jobs
- this will create jobs api and job handlers packagesas well as add all the neccessary config to terraform and semahore. You'll get an option to pick between Prisma (Postgres) and Agenda (Mongo) job managers.npx nx generate @bonnet-ltd/starter:infra
- this will add a service to semaphore and terraform configs. This is only needed if you have manually created some package and want a hassle free way of addint it to the configs