Giter Club home page Giter Club logo

tech-blog's Introduction

tech-blog

License: MIT

Description

Task was to build a CMS-style blog site similar to a Wordpress site, where developers can publish their blog posts and comment on other developers’ posts. This app has been built completely from scratch and deployed to Heroku. The app follows the MVC paradigm in its architectural structure, using Handlebars.js as the templating language, Sequelize as the ORM, and the express-session npm package for authentication.

Table of Contents

Installation

​Install dependencies using:

npm install

Usage

Login to mysql using the terminal using and the follow with your password:

mysql -u root -p

The db schema will be added using the following:

source .db/schema.sql

Mock seeds have been created and will be added using the following:

npm run seed

The application will then be invoked by using the following command:

npm start

Directory Structure

.
├── assets/
├── config/
├── controllers/
│ ├── api/
| | ├── blogRoutes.js
| | ├── commentRoutes.js
| | ├── userRoutes.js
| | └── index.js
│ ├── homeRoutes.js
│ └── index.js
├── db/
├── models/
│ ├── Blog.js
│ ├── Comment.js
│ ├── User.js
│ └── index.js
├── seeds/
├── utils/
├── views/
│ ├── layouts/
│ └── partials/
├── .env
├── .gitignore
├── LICENSE
├── package.json
├── README.md
└── Server.js

Technologies Used

  • Node.js
  • Express.js
  • MySQL
  • Sequelize (ORM)
  • mysql2
  • marked and dompurify (support styling blogs with markdown)
  • dotenv
  • Heroku

Setup

  • Nodejs must be installed
  • MySQL must be installed
  • Insomnia is recommended to test routes
  • MySQL Workbench (MySQL GUI recommended but not required)
  • Text editor (VS Code recommended)

Deployment

This app has been deployed via Heroku. If you choose to deploy your own ensure that the JAWSDB variable is set at the dyno. Upon ensuring that enviroment variables have been set up in the settings tab, you can go ahead and deploy the app to Heroku.

Additionally, deployed code should not be linked to any locally stored environment variables on your local machine.

If deployment fails, try debugging using the following command using the heroku CLI:

heroku logs --tail

Then in the upper right corner of your heroku UI, click on more actions then select the option to restart all dynos. This will capture the logs as the app starts up it should allow you to get the entire stack trace

Appearance

My dashboard view of Tech Blog Single post view of Tech Blog Comments editing view of Tech Blog

Acknowledgements

Questions

Created by: @moedaaboul

Feel free to contact me via [email protected]!

License

This work is licensed under MIT.

tech-blog's People

Contributors

moedaaboul avatar

Watchers

 avatar

Forkers

govind15496

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.