yarn gen
Generate typescript code follows codegen.yml
yarn start
Start express server
yarn typeorm
Shortcut to call typeorm with ts-node.
You can pass any option like yarn typeorm schema:sync
While create entities, you'll get an error message like
typeorm Property 'password' has no initializer and is not definitely assigned in the constructor.
.
That is due to "Strict Class Initialization" (http://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#strict-class-initialization).
You should apply !
each before fields after properties.
TypeORM currently doesn't support table initialization from entities. So you need some trick to do it.
yarn typeorm schema:sync
yarn typeorm migration:create -n Initialize
to create empty migration filehttps://github.com/typeorm/typeorm/blob/master/docs/migrations.md