Giter VIP home page Giter VIP logo

exp-seq-review-for-learning-team's Introduction

Sequelize and Express Review for Hannah's Learning Team

Doing stuff! This is a review of backend technology for the upcoming checkpoint.

Getting started

  1. Fork and clone this repo
  2. cd into the repo
  3. npm install
  4. Create a database called dog-time on your machine by running createdb dog-time in your command line (it doesn't matter what directory you're in when you run this)
  5. I've created a seed file that populates your database with dummy data so that you don't have to make a million post requests in order to have data. DO NOT WORRY AT ALL about how to make a seed file right now. In order to populate your database with this seed file, run node scripts/seed.js to seed your database. Only do this after you've created your db in step 4. Until you do this, you won't have any data to work with.
  6. Look at your new database in Postico and see what data you have
  7. Start the application with: npm start
  8. Start looking at routes! Remember that all routes that serve up data in this project are prepended with localhost:3000/api, i.e. the full all dogs route is localhost:3000/api/dogs/
  9. Use your browser to test out get routes and use Postman to test out put, post, and delete routes. Play around with the different ways you can add data with the existing setup, for example:
    1. You can pass in an ownerId when you create a dog and an association will be made automatically (as long as an owner with that id exists in the database)
    2. You can also post a dog with a dogYearsAge property and it will automatically create an age field based on the virtual setter we have
    3. Aaaand you can create a dog without specifying a breed and your dog will be assigned the breed 'mutt' by default

exp-seq-review-for-learning-team's People

Contributors

queerviolet avatar hkwweber avatar khumphrey avatar omriackley avatar danceoval avatar geoffbass avatar intersim avatar coreygreenwald avatar nadrane avatar davidyang avatar

Watchers

James Cloos avatar

Forkers

joecosta117

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.