Skip to content

This repository is the backend part of DiscBook. It is a website project for CD lovers and collectors.

Notifications You must be signed in to change notification settings

Jannis-Passalis/DiscBook-Server

Repository files navigation

DiscBook-Server

This server is made to be connected with the client of DiscBook and is deployed with Heroku.

Functionalities and Technology

Functionalities

  • Endpoints to get, post and patch data from the DiscBook Database (by using PostgreSQL and ElephantSQL.
  • Sending emails to users with Nodemailer
  • Authorization checks with middleware.
  • Running server with Express
  • Managing the database models and migrations with Sequelize

Languages and Tools

nodejs-icon vscode-icon javascript-icon sequelize-logo nodemailer-icon postgresql-icon

Installation Guide

  • Install dependencies
npm install
  • Configure your database in config/config.json

  • Create database, run migrations & seed data

npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
  • Start your server
npm start

Endpoints

Method Path Purpose Required Parameteres Auth
GET '/cds' Get all CDs in DB none no
POST '/cds/add' Add a new CD to DB album, year, cdCover, userId yes
DELETE /cds/delete/:cdId Delete a CD from DB cdId yes
PATCH '/cds/sell/update/:cdId' Update "forSale" from true to false or otherway around cdId yes
POST '/email' Send email to owner of a cd from interested user senderId, recieverId, album yes
GET 'user/me' Get user that is logged in none yes
POST '/login' Login a user email, password no
POST '/signup' Sign up a new user name, email, password, picture no

About

This repository is the backend part of DiscBook. It is a website project for CD lovers and collectors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published