Giter Club home page Giter Club logo

u-develop-it's Introduction

U-Develop-It

Description

This project uses a combination of node, inquirer package, npm console.table, SQL, and mysql2 to create an accessible database.

This project was a great introductionto SQL. I practiced creating schemas and seed files, as well as learning the SQL language, using join to create database tables and other queries to edit and delete the data. I also worked with npm inquirer again, as well as learned about creating a connection to the server using constructors.

Table of Contents

Installation

If the user already has node installed on their device, they can download this project and run "npm init" and then "npm install --save inquirer@^8.0.0 (** please note: newer versions of inquirer will not work properly with this program!), and then npm install console.table --save. After this, install --save mysql2. In order to protect passwords, the user will also want to "install dotenv" as well.

In order to access the mysql2 shell, the user needs to create a .env file with the following, replacing and with the users own username and password:

DB_NAME=ecommerce_db

DB_USER= < username >

DB_PASSWORD= < user password >

To ensure the user is connected to the correct database, navigate to the root folder of the project, and then open the mysql2 shell and enter "source db/schema.sql". Then enter "source db/seeds.sql" to seed the database file. Exit the mysql2 shell by entering "exit" into the command line.

Finally, connect the server by entering "npm start" into the command line.

Usage

This is a voting app to pick a new president for an imaginary group named "U Develop It". This project developed the backend relational database for this voting application. The user can pick the individual they would like to be president and cast a vote for them on this application. The user can then view how many votes each candidate has received and with which parties they are affiliated.

Note: there is no front end to this application, it is purely SQL backend. To view the functionality of the backend, connect to either Insomnia or Postman and type localhost:3001/api/candidates in to the top bar or http://localhost:3001/api/parties. You can also view http://localhost:3001/api/voters. From here, you can utilize CRUD commands to create, view, update, and delete new candidates, parties, and voters.

Screen Shot 2022-09-30 at 12 22 01 PM

Screen Shot 2022-09-30 at 12 22 36 PM

Links

The url of the Git repository is here: https://github.com/Samantha-Ruth/U-Develop-It

Questions

If you have any questions about the repo, open an issue or you can find more of my work at (https://gitHub.com/Samantha-Ruth).

u-develop-it's People

Contributors

samantha-ruth avatar

Watchers

 avatar

u-develop-it's Issues

Create the voters' table

Body:
User Story

  • As a user, I can request a list of voters alphabetized by last name.

  • As a user, I can request a single voter's information.

  • As a user, I can create a voter.

  • As a user, I can update a voter's email.

  • As a user, I can delete a voter.

Create the votes table

Body:
User Story

  • As a user, I can tabulate all the votes cast by candidate ID in descending order.

  • As a user, I can cast a vote for a candidate.

Create the parties' table

Body:
User Story

  • As a user, I can update a candidate's party affiliation.

  • As a user, I can request a single candidate's information, including party affiliation.

  • As a user, I can request a list of all the parties.

  • As a user, I can request a single party's information.

  • As a user, I can delete a party.

  • As a user, I can request a single candidate's information.

  • As a user, I want to delete a candidate.

  • As a user, I want to create a candidate.

Create a database that contains the candidates' table

Body:
User Story

  • As a user, I can request a list of all potential candidates.

  • As a user, I can request a single candidate's information.

  • As a user, I want to delete a candidate.

  • As a user, I want to create a candidate.

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.