A simple nodejs app connected with mySQL database.
- Clone the repo
git clone https://github.com/verma-kunal/nodejs-mysql.git
cd nodejs-mysql- Create a
.envfile in root directory and add the environment variables:
DB_HOST="localhost"
DB_USER="root" # default mysql user
DB_PASS=""
DB_NAME=""
TABLE_NAME=""
PORT=3000Make sure to create the database and the corresponding table in your mySQL database.
- Initialize and start the development server:
npm install
npm run dev