GithubHelp home page GithubHelp logo

filipe-freire / ironhack-june-2020-react-cruder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from josecarneiro/ironhack-june-2020-react-cruder

0.0 1.0 0.0 0 B

JavaScript 79.71% HTML 15.59% CSS 4.69%

ironhack-june-2020-react-cruder's Introduction

Models

Post Model

Schema:

{
  "content": {
    "type": String,
    "maxlength": 280,
    "required": true
  }
}

Route Handlers

METHOD  ENDPOINT/ACTION      DESCRIPTION

GET    -  '/post/list'        -  List all posts and send them as JSON to the client.

POST   -  '/post'      -  Handle post creation form submission. Send the created post in JSON response.

GET    -  '/post/:id'         -  Load single post and send them as JSON to the client.
DELETE -  '/post/:id'         -  Delete single post
PATCH  -  '/post/:id'         -  Handle post editing form submission, send the edited post as JSON.

GET - Load data. Should not mutate anything on the server or database. POST - Add data. Usually includes a request body. Mutate data on the server or database. DELETE - Delete data. Usually does not include a request body. Mutate data on the server or database. PATCH - Edit data. Usually includes a request body. Mutate data on the server or database. PUT - Replace data. Usually includes a request body. Mutate data on the server or database.

// Client side app

'/' - Home view, calls service that lists all posts from REST API '/post/create' - Post creation view. Has form that, when submited, calls service to create post. '/post/:id' - Single Post view, calls service that loads single post from REST API '/post/:id/edit' - Edit Post view, calls service that loads single post from REST API. Has form that, when submited, calls service that edits specific post. Has second form that, when submited, calls service that deletes post.

TO DO

Complete PostEditView with all of the requested functionality. Abstract post form logic into standalone component that is reused in PostCreationView and PostEditView (tip: get content as prop and lifts state).

ironhack-june-2020-react-cruder's People

Contributors

josecarneiro 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.