Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

BACK END express audiobook app. Adding audiobooks and manage them as an owner and admin. Validation and error handling.

Notifications You must be signed in to change notification settings

PawelGozdz/express-audiobook-store

Repository files navigation

Project-16-express-shop

Technologies used:

pug, sequelize, mysql, bootstrap 4, nodemailer

Middlewears:

csrf, Multer, express-session, express-validator, helmet, express-compression, morgan

Error Handling

Basic error handling has been implementing. Both for Errors and for Page Not Found.

MVC pattern

M - Model folders contains models
V - View folder contains pug files for:

  • Admin, which are all user logged in routes
  • Auth, which is for login, signup and reseting the password
  • Layouts, which is the Main pug file
  • Store, which contains all none logged in routes

C - Controller, which is a logic for all routes (admin, auth, error & store)

Public & Images folders

Public - contains all FRONT END associated folders and files, like front end JS and CSS.
Images - folder with images imported by users. This folder has an additional logic, which helps to create sub-folders based on year/month/day.

How to start the app.

To run the app, db credientials must be put.
To create all the tables and associations, uncomment row 110 in app.js.

.sync({ force: true })

This line creates everything. Run 'npm start'.
Once all created, comment it out, and 'npm start' again.

About

BACK END express audiobook app. Adding audiobooks and manage them as an owner and admin. Validation and error handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published