Skip to content

hseymo/selfcareBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badge

Table of Contents



License


MIT License

Copyright (c) 2022 Haley Seymour

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Installation


To install this project:

  1. Start by forking this repository on Github.
  2. Clone this project to your machine by using the "git clone + URL" command.
  3. Open the project with your favorite text editor, like VS Code (in your terminal, first type "cd foldername" then "code .").
  4. Install Node.js from their website, if you have not already. Here are some additional instructions.
  5. Install MySQL from their website, if you have not already. Here are some additional instructions.
  6. Suggest installing Nodemon if you have not already.
  7. Suggest installing Insomnia if you have not already.
  8. This project includes a package.json file that specifies dependencies for this project, so be sure to run "npm install". This will install the packages specified in the next section.
  9. If you are working in correlation with the front end, make sure to change the front end to send fetch requests to your local server rather than the deployed heroku URL. Make this change in src/utils/API.js by changing the BASE_URL on line 1.

Packages


General Technologies:

  • Javascript
  • Node.js
  • Git
  • Heroku
  • Insomnia

NPM Packages

  • mysql2
  • sequelize
  • express
  • cors
  • dotenv
  • bcrypt
  • jsonwebtoken
  • nodemon

Description


This project is a MySql server for our project 'Self Care Central'. The project is a hub for tracking all things self care. The server contains models for users, sleep, mindfulness, hydration, goals and fitness. Users have a one-to-many relationship with all but goals; users have a one-to-one relationship with goals. The controller routes are built out with full CRUD functionality for sleep, mindfulness, hydration, goals and fitness.

Check out the front end Github and deployed project.

To view this server deployed, click here.

Usage


After following the instructions in installation:

  1. Open the database file in your terminal.
  2. Run command "mysql -uroot -p" and enter your password (note: keystrokes will not show).
  3. Run command "SOURCE schema.sql" to set up the database and tables.
  4. Optionally, run command "npm run resetdb" to replace steps 2 and 3 (enter password when prompted).
  5. OK to 'quit' MySql.
  6. Create a file called ".env" in the root folder of the program. In this folder include the following information:
    DB_NAME=''
    DB_USER=''
    DB_PW=''
    JWT_SECRET=''
  7. Open the "index.js" file in your integrated terminal.
  8. Run command "npm run seed" (or "node seed/seed.js") to seed the database if desired.
  9. Run command "npm run start" (or "node index.js"). Alternatively, if you have Nodemon installed, run "npm run watch" (or "nodemon index.js").
  10. Open 'localhost:3001' in your browser and see the site in action.
  11. When finished, run CONTROL-C in terminal to end stop nodemon, and trash the session.

Contributing


This project was completed as a group as 'project 3' for the University of Washington Web Development Bootcamp. If you would like to contribute, please feel free and contact us with questions.


Questions?


If you have any questions, please feel free to contact our team:

  1. Project Manager: Haley Seymour | Github | email
  2. Git Administrator: Chris DeLaGarza | Github | email
  3. Kalif Purce | Github | email
  4. Jaden | Github | email

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •