Please add notes for how to setup your project
You need to create the database and setup the .env to run this. You may also need to do an npm install...
Use Mysql Workbench and copy and run each document in it.
Create/use the .env file and put in these elements DB_NAME=(db-name) DB_USER=(db-user) DB_PWD=(db-password)
node server.js
open browser to http://localhost:3000
You will need to configure environmental variables for the .env above to correspond to your jawsDB.
This code has been written towards keeping it clean and simple, yet self-explanatory.
It has also been written in a style to sheppard us into the style used in React, hence the onClick listeners embedded in the HTML.
We try to use ES6 async functions for clean handling of asyncronous functions.
We serve RESTful API calls on the backend, as is good modern programming practice.
Finally we illustrate how npm packages can be used on the server and client side (moment.js)
Enjoy! Feel free to use this as a template towards your next project!