Skip to content

TypeScript, express, typeorm, jwt, repository pattern

Notifications You must be signed in to change notification settings

Covicake/express-typeorm-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express REST API with TypeORM and JWT auth

Basic implementation for a express.js server using TypeScript, TypeORM and JWT auth. It involves:

Auth

  • [Pending] Signup
  • Hashing of passwords before inserting to Database (With bcrpt)
  • Login comparing hashed password
  • JWT authorization for every controller, except 'AuthController' (with jsonwebtoken)

TypeORM

  • [Pending] Setup migrations
  • Entities-to-database synchronization
  • Entities definition (with autoincremented ids, auto-inserted created_at|updated_at columns) and many useful configs
  • Repository pattern implementation
    • [Pending] implement singleton pattern for repository classes and inject them to the controllers (A la Spring Boot)

Express

  • Autowired express server with
  • global middlewares
  • controllers setup
    • with their own set of local middlewares
  • typeorm connection

This is an example implementation for these features, should work as a template. The example is for a simple wishlist application with categories to hold the items, which also belong to the user who 'wished' them.

About

TypeScript, express, typeorm, jwt, repository pattern

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published