This is a simple application to use MVC moddel with node js to connect to sql database and access REST apis. This is an application to view a tech blog with users to create, edit and delete posts as well as add comments. Techonologies mysql2, dotenv, express, sequelize, MVC model.
This is for local install if you want to deploy the appliaction yourself
- clone repo on github
- Install any required dependancies
npm install
- Enter your SQL database crendentials in .env file (see .env.Example)
DB_HOST=<database hostname>
DB_NAME=tech_blog_db
DB_USER=<database user>
DB_PASS=<database password>
- Login to SQL on command line
mysql -u <user> -p
- Create database by running the schema
sourec db/schema.sql
quit
- (Optional) Seed values for db
npm run seeds
- Start the application on nodeJS
npm start
- Once the application is started go to application website (default: https://localhost:3001)
- Homepage, ability to see all posts,
- Login page with option to create a new user
- Dashboard available after login.
- Create new a post
- Dashboard displays all posts created by user with ability to edit post
- User can edit post content and title or delete post. Additionally user can also add comments to post here.
- Clicking on Post title redirects to post details and comments
N/A
This application is under the MIT License
For more information please view here: MIT Description
Feel free to clone and improve on this application!
See more about my Github here: Fchoi1
Any burning questions you want to ask me?
Reach out to me! [email protected]