Skip to content
Snippets Groups Projects
Brandon Rodriguez's avatar
94b51a13

JavaScript - NodeJS MySql Example

Description

Example of using a NodeJS JavaScript application to connect to MySQL and make database queries.

Program Setup

First, make sure MySQL is installed and setup on your program. Then install NodeJs.

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.

Running the Program

Once the program is setup, use a terminal to cd into project root, then run node app.js.