hey guys,
i'm new to ragemp and javascript.
i use node. how is it possible to use my mysql connection from other files? Like database.js
my code where i want the connection of database:
"use strict"
const datab = require('../Database');
const List = [];
connection.query("SELECT * FROM `table`", function(error, result) {
if(error) {
throw error;
}
else {
console.log('Result is '+result[0].uName);
}
});
i want to load my whole table to the List