Skip to content
Snippets Groups Projects
Commit 8ac8ed07 authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Move config to project root

parent 1f674b23
Branches
No related merge requests found
......@@ -5,7 +5,7 @@
// System Imports.
// User Imports.
const config = require('./src/config.js');
const config = require('./config.js');
const { userConfirmation } = require('./src/helper_functions.js');
const testLogLevels = require('./src/logging.js');
const MySql = require('./src/mysql.js');
......@@ -38,8 +38,6 @@ async function main() {
mysql.reset_db();
mysql.close_conn();
console.log('');
console.info('Terminating program.');
......
......@@ -7,7 +7,7 @@ var config = {
mysql: {
host: '127.0.0.1',
port: '3306',
database: 'mysql_bot_example',
database: 'mysql_connector_example',
user: 'root',
password: 'root'
}
......
# JavaScript - NodeJS MySql Example
# JavaScript - NodeJS MySql Connector Example
## Description
......@@ -6,10 +6,11 @@ Example of using a NodeJS JavaScript application to connect to MySQL and make da
## Program Setup
First, make sure MySQL is installed and setup on your program. Then install NodeJs.
First, make sure MySQL is installed and setup on your program. Then install NodeJs and run `npm install` from project
root.
Once that's done, import `<project_root>/src/database_export.sql` to a new database, edit `<project_root>/src/config.js`
to connect to your local MySql instance.
Once that's done, import `src/database_export.sql` to a new database, and edit `config.js` to connect to your local
MySql instance.
## Running the Program
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment