This repository contains models created through a schema and sequelize extension that is then rendered through a handlebars template. It follows an MVC formate with sequelize as the ORM and express-session npm package for authentification.
To install necessary dependencies, run the following commands (assuming you are on git bash and already have node.js/nodemon installed):
- Clone the repository where you want to save the code:
git clone [HTTPS/SSH/CLI link]
- Navigate over to files in terminal
- Type in terminal:
npm i
-
Run the schema.sql in your local machine and change connection details to match your root and password values.
-
Issue the following command to populate your database with seeds:
node seeds/index.js
- Run either commands through node in the terminal:
node server.js
nodemon server.js
- Run a popular REST client (such as insomnia) to interact with the API and test its API functionality. OR go on the web server through the html link http://localhost:3001/.
This program can be used to observe how js can tie in with mysql2 through using an ORM framework such as sequelize. Users can also learn and understand how it ties in with express framework as well as how everything connects in general backend coding with javascript. This program can be used to test and observe how sequelize as well connects with different tables in the database as well. It also shows how the front end can connect with the handlebars engine and library. It effectively shows the user MVC format for a basic fullstack application that connects the front end to a database as well as a basic UI interaction with data that was generated and saved.
- EdX for sample documentation to begin with as well as a sample stylize library for teh website. (did not design css myself)
nodemon, node, mysql2, sequelize, express, SQL Workbench, handlebars, Insomnia
- deployed link: Deployed Github Page
- Click on this link to see an example of the site without running your own seeded database: Heroku Link