Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mysql from 'mysql'
- export class DB {
- constructor() {
- this.db = mysql.createConnection({
- host: '...host',
- user: '..login',
- password: '...pass',
- database: 'selected_database',
- supportBigNumbers: true,
- bigNumberStrings: true
- })
- }
- Connect() {
- this.db.connect();
- return this.db;
- }
- }
Add Comment
Please, Sign In to add comment