easy-mysql-js
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "easy-mysql-js", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Easy MySQL for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,3 +17,3 @@ # easy-mysql-js | ||
Install the package | ||
1- Install the package | ||
@@ -23,4 +23,5 @@ ```shell | ||
``` | ||
Initialize prisma | ||
2- Initialize Prisma | ||
```shell | ||
@@ -30,2 +31,22 @@ $ npx prisma init | ||
3- Configure schema.prisma file | ||
``` | ||
After installed Prisma, you will see "schema.prisma" file in prisma folder. Open schema.prisma file and change "postgresql" as "mysql". | ||
``` | ||
4- Configure .env file | ||
``` | ||
DATABASE_URL="mysql://your_db_username:your_db_password@your_ip_address:3306/your_db_name" | ||
NODE_ENV="development" | ||
``` | ||
5- Generate Database Tables | ||
```shell | ||
$ npx prisma db pull | ||
$ npx prisma generate | ||
``` | ||
NOTE: If you update your database tables, columns, etc. you need to run: | ||
@@ -32,0 +53,0 @@ |
14386
318