typeorm
@0.3.10 (with migrations)type-graphql
@1.1.1typedi
@0.10.0 (For Dependency Injection)jsonwebtoken
@8.5.1apollo-server-express
@3.11.1class-validator
@0.13.2
yarn
to install all the dependenciesyarn dev
to run nodemon development serveryarn build
to compile typescript codeyarn start
to run compiled codeTableName=<name> yarn migration:create
to create migrationyarn local-migration:run
to run migrations in devyarn local-migration:revert
to revert migrations in devyarn prod-migration:run
to run migrations on productionyarn prod-migration:revert
to revert migrations on production
.
├── dist # Compiled files
├── src # Source files
│ ├── db # All Database related files
│ │ ├── entities # All Database Entities
│ │ ├── migrations
│ │ └── index.ts # Database Maneger
│ ├── errors
│ ├── middlewares
│ ├── modules # All Modules
│ │ ├── <name> # Entity Name
│ │ │ ├── <name>.resolver.ts # All queries and Mutation related to the entity
│ │ │ ├── service.ts # Service class of entity
│ │ │ └── types.ts # Input and Object types for validation
│ ├── types # custom types are defined here
│ ├── utils # utility functions
│ ├── index.ts # Entry point
│ └── apolloServer.ts # Apolloserver setup
├── ormconfig.ts # DataSource options for typeorm DataScource
├── .lintstagedrc.json # Lint Staged Options
├── .prettierrc.json # prettier Options
├── dist # Pre-Commit Hooks
└── README.md