This full stack web application utilizes HTML, CSS, Handlebars, JavaScript, MySQL, Node.js, and Node Package Manager (bcrypt, connect-session-sequelize, dotenv, express, express-handlebars, express-session , handlebars, mysql2, sequelize) to build an MVP startup forum resembling Reddit. Through the implementation of the MVC paradigm, Object-Relational Mapping, CRUD functionality, template generating engines, and authentication features, users have the ability to:
- Sign up and create an account
- Log in as a returning user
- Create, edit, view, and delete posts
- Add comments to posts
- Upvote or Downvote on posts
- Navigate to Sign up, Log in, Home, Dashboard, and Edit pages
Visit the deployed Heroku site HERE
-
Prior to starting up the program, make sure you have Node.js, MySQL, and Insomnia installed onto your local computer for testing purposes.
-
To install this application, clone this repository onto your local computer, open it in your code editor, and run the following command on your terminal:
npm install
-
Once all dependencies have been installed, create an environment variable file (.env) at the root level of this application with the following content for successful connection to the database:
- DB_NAME = platform_db
- DB_USER = <'mysql-username-here'> (If no username is set, default user for SQL is 'root')
- DB_PW = <'mysql-password-here'> (If no password is set, by default SQL has no password)
-
Once all packages have been installed, run the mysql shell command
mysql -u root -p
and enter your password (if one has been set) before runningsource db/schema.sql
. Once completed, typeexit
. -
After exiting the mysql shell, run the command
npm start
,npm run start
ORnode server.js
on your terminal to turn on your server. -
Once the server has been turned on, head over to Insomnia to test API GET, POST, PUT, and DELETE routes in order to create, read, update, and delete data from the SQL database.
- This project is licensed under: ISC
- Forking this repository is always welcomed and encouraged!
If you encounter a problem with this application, please add an issue or pull request to the GitHub repository.
- Please feel free to use this application at any time and visit our personal GitHub profiles to access other open source projects!