Code Monkey home page Code Monkey logo

netflix-and-choose-backend's Introduction

Phase 3 Project

Requirements

  1. Access a Sqlite3 database using Active Record.
  2. You should have a minimum of two models with a one to many relationship.
  3. You should build out a simple React frontend that incorporates at least one GET request and one non-GET request (POST, PATCH, DELETE). Example: A user should be able to build out a todo list. A user should be able to create a new task, see all the tasks, update a specific task and delete a task. Tasks can be grouped into many categories, so a task has many categories and categories have many tasks.
  4. Use good OO design patterns. You should have separate classes for your models and incorporate instance and class method.

Getting Started

Clone down this Sinatra repository.

First, cd into the the cloned repo and run bundle install in your backend folder to install your gems.

The app/controllers/application_controller.rb is going to be the place where you write your controller methods to handle any incoming request to your Sinatra API.

Start your server with:

shotgun

Note: This will run your server on port http://localhost:9393. shotgun is a ruby gem that will automatically reload your Sinatra server. You may still need to refresh your browser to see changes.

Your backend and your frontend should be in two different repositories. Create a new repository in a separate folder with a React app for your frontend using create-react-app.

Fetch Example

Your React app should make fetch requests to your Sinatra backend! Here's an example:

fetch("http://localhost:9393/test")
  .then((res) => res.json())
  .then(console.log);

netflix-and-choose-backend's People

Contributors

hyeokjungkim avatar nkusumo 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.