This repository demonstrates how to configure and use TypeORM (with the MySQL[JS] driver) with MariaDB.
- Node.js
- MariaDB - to get started with MariaDB check out this guide!
JavaScript
- Part 1: Using Entities and Connecting to MariaDB with TypeORM
- Part 2: Managing Entity Relationships - Coming Soon!
- Part 3: Advanced Querying - Coming Soon!
TypeScript
- Part 1: Using Entities and Connecting to MariaDB with TypeORM - Coming Soon!
- Part 2: Managing Entity Relationships - Coming Soon!
- Part 3: Advanced Querying - Coming Soon!
To use the samples in this repository you must perform the following steps:
-
Clone this repository.
$ git clone https://github.com/mariadb-developers/nodejs-typeorm-quickstart.git
-
Create the database and tables contained in schema.sql in your MariaDB database instance.
For example, using the MariaDB command-line client:
$ mariadb --host 127.0.0.1 --port 3306 --user <user> --password <password> < schema.sql
or just copy, paste and execute the contents of schema.sql in your preferred client.
-
Install the required packages (mysql and typeorm).
$ npm i
-
Run the desired sample.
For example:
$ node javascript/part1/index.js
or
$ node typescript/part2/index.ts
and so on.
Note: Remember to update the database configuration to point to your MariaDB database.
Please feel free to submit PR's, issues or requests to this project directly.
If you have any other questions, comments, or looking for more information on MariaDB please check out:
Or reach out to us directly via: