1.0.3 • Published 2 years ago
@jah0ngirsobirov/sculter.js v1.0.3
Sculter.js
New Sculter.js v1.0.0 for you
To create a program that can integrate with Node.js and MySQL, a lot of code needs to be written, and these codes are difficult for beginners to understand. But with Sculter.JS, you can significantly shorten the code you write in MySQL, and it will be much more understandable even for beginners. For example:
Creating database in Node.js MySQL
var mysql = require('mysql');
var con = mysql.createConnection({
host: "localhost",
user: "yourusername",
password: "yourpassword"
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
con.query("CREATE DATABASE mydb", function (err, result) {
if (err) throw err;
console.log("Database created");
});
});
Creating database in Node.js MySQL + Sculter.js
const sculter = require("sculter.js");
let Connect = sculter.Connection;
new Connect(["localhost", "yourusername", "yourpassword"]).sql("CREATE DATABASE mydb;");
console.log("Database created");