Skip to content

The project demonstrates a proper configuration of an API application uses TypeORM (over a PostgreSQL database) with Express.js and written in TypeScript.

Notifications You must be signed in to change notification settings

davidcsejtei/api-type-orm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js API using Express and TypeORM, written in TypeScript

The project demonstrates a proper configuration of an API application uses TypeORM (over a PostgreSQL database) with Express.js and written in TypeScript. For the sake of the example it has a User entity with a UserRepository and migration alongside a UserSubscriber.

A configuration file needs to be created as a prerequisites which contains your database access information like the host, database name, username, etc.

Read the official TypeORM documentation to learn how to use entities, migrations, repositories and other tools properly.

Set your database options in ormconfig.json

The example uses a PostgreSQL database engine but you can change that in the ormconfig.json following the supported database drivers.

Installation

npm install

Start

npm start

About

The project demonstrates a proper configuration of an API application uses TypeORM (over a PostgreSQL database) with Express.js and written in TypeScript.

Topics

Resources

Stars

Watchers

Forks