-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
In this issue we want to create a simple database using typeorm. Install typeorm and sqlite, and create a dataSource.ts file with sqlite type in your project. Define a simple entity for User:
User {
id: number,
fName: string,
lName: string,
age: number
}
id should be an autogenerating column for your entity.
Add the entity to your data-source.ts and initialize and migrate the database in index.ts. Check the created database by saving one user information.
What to google
- typeorm
- dataSource
- database entity
- database initialization and migration
- save query
Suggested resources
https://typeorm.io/
https://orkhan.gitbook.io/typeorm/docs/data-source
https://medium.com/@peturgeorgievv/how-to-setup-automatic-migrations-with-typeorm-on-deployment-2224544a4838
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels