filmov
tv
Database Setup in Nodejs | MYSQL|Express.js
Показать описание
Database Setup in Node JS
-Create a schema named student_db
-Create tables named students
-id int
-name varchar
-rol_no int
-fees int
-class int
-medium varchar(45)
-Add manual data/dummy values in MYSQL
INSERT INTO students (name, rol_no, fees, class, medium) VALUES
('John Doe', 1, 1500, 10, 'English'),
('Jane Smith', 2, 1500, 10, 'English'),
('Michael Brown', 3, 1400, 9, 'French'),
('Emily Davis', 4, 1600, 11, 'English'),
('Daniel Wilson', 5, 1550, 10, 'Spanish');
-Connect the MYSQL database with nodejs
-Search for MYSQL pkg on website
-pkg name:mysql2
-Create a new folder named config in root directory
const mysql=require('mysql2')
host: '127.0.0.1',
user: 'root',
database: 'student_db',
port:3306,
});
-Next will create the REST API in other video.
#nodejs
#javascript
#fullstack
#backend
#programming
#coding
#webdevelopment
#developer
#softwaredevelopment
-Create a schema named student_db
-Create tables named students
-id int
-name varchar
-rol_no int
-fees int
-class int
-medium varchar(45)
-Add manual data/dummy values in MYSQL
INSERT INTO students (name, rol_no, fees, class, medium) VALUES
('John Doe', 1, 1500, 10, 'English'),
('Jane Smith', 2, 1500, 10, 'English'),
('Michael Brown', 3, 1400, 9, 'French'),
('Emily Davis', 4, 1600, 11, 'English'),
('Daniel Wilson', 5, 1550, 10, 'Spanish');
-Connect the MYSQL database with nodejs
-Search for MYSQL pkg on website
-pkg name:mysql2
-Create a new folder named config in root directory
const mysql=require('mysql2')
host: '127.0.0.1',
user: 'root',
database: 'student_db',
port:3306,
});
-Next will create the REST API in other video.
#nodejs
#javascript
#fullstack
#backend
#programming
#coding
#webdevelopment
#developer
#softwaredevelopment