Git Product home page Git Product logo

potterverse-fan-site-server's Introduction

Potterverse Server

Overview

Welcome to Potterverse

The purpose of this project is to create an all-inclusive Harry Potter fan site where fans will have a welcoming place to go, regardless of sexual orientation, sexual identification, race, gender, etc.

The server-side encrypts data, utilizes Postgres, uses database associations, and runs endpoints (http requests).

Potterverse is an interactive encyclopedia of the following categories: Characters, Magical Objects, Potions, Potion Ingredients, Spells, Wand Cores, and Wand Woods. Users can create comments on entries, edit them, view their comments and other's comments, and delete them. They can also view their profile that they create upon sign up, edit their profile and delete their profile. Users cannot see any of the site unless they are logged in or after they sign up.

Code Example

Here is an example of the code:

router.post("/", function (req, res) {
  Characters.bulkCreate(CharactersImport)
    .then(
      function createSuccess(loggingData) {
        res.send({
          message: "Completed characters import",
        });
      },
      function createError(err) {
        res.send(500, { message: err.message });
      }
    )
    .catch(function createError(err) {
      res.send(500, { message: err.message });
    });
});

router.get("/", function (req, res) {
  Characters.findAll({ include: Comment })
    .then((character) => res.status(200).json(character))
    .catch((err) => res.status(500).json({ error: err }));
});

The router.post is used as an endpoint to populate the Character data in the database. There is one of these for each of the categories. The router.get is used to get all characters in the JSON document I created and is used to populate them on the screen using componentDidMount().

Tech-Framework Used

The following Tech/Frameworks covered:

Node-Server

  • User Authentication
  • Database Associations
  • Utilizing Postgres
  • jsonwebtoken, bcrypt, and middleware
  • Creating 51 endpoints (try/catch)
  • Creating 10 data models

Github

potterverse-fan-site-server's People

Contributors

courtneydowns avatar

Watchers

 avatar

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.