- Typescript
- Express
- Passport JWT Authentication
- TypeORM configured for MySQL
- Basic User and Admin controllers
- Basic role checking
- ESLint for Typescript
- Prettier for code formatting
Install Node.js and NPM Install a MySQL Database (i used XAMPP).
Configure package.json for your own project.
npm run start
This installs all dependencies with NPM. After that you can run
npm run migration:run
to create the Admin account.
You can check package.json
for the full list of commands.
I suggest installing typeorm
globally.
Name | Description |
---|---|
build/ | Compiled source files will be placed here |
src/ | Source files |
src/config/ | Configuration file (JWT Secret, Issuer) |
src/controllers/ | REST API Controllers |
src/entity/ | TypeORM entities like User |
src/api/middlewares/ | Express Middlewares like Passport JWT |
src/migration/ | Migration files with an example migration. |
src/routes/ | REST API EndPoints |
src/utils/ | Other utility files such as Roles |
.eslintignore | ESLint ignored files |
.eslintrc.js | ESLint Configuration file |
.gitignore | gitignore configuration |
.prettierignore | Prettier ignored files |
.prettierrc.json | Prettier Configuration file |
.ormconfig.json | TypeORM configuration file (MySQL) |
.package.json | Self Explanatory |
.tsconfig.json | TypeScript Configuration file |