Skip to content
Snippets Groups Projects
Select Git revision
  • cec9b3b1a6cee74ad953429566906c63acab869f
  • master default
  • solution
3 results

react-tutorial-front

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    safarte authored
    cec9b3b1
    History
    Name Last commit Last update
    public
    src
    .gitignore
    README.md
    package.json
    yarn.lock

    Formation React

    By Safarte and Soudini

    Install

    • Install NodeJS
    • Install yarn
    • Run:
    git clone https://gitlab.viarezo.fr/LinkCS/react-tutorial-front.git
    cd react-tutorial-front
    yarn install

    Usage

    To run this website locally execute yarn start in the working directory.

    API

    GET /users => [Object] -> Lists all users

    GET /users/id => Object -> Get the info about the user with asked id

    GET /boards => [Object] -> Lists all boards

    GET /boards/id => Object -> Get the info about the board with asked id

    GET /messages?board=id => [Object] -> Get the messages from the board with asked id

    To post a message from specified user on specified board:

    POST /messages
    body:
    {
      "content": "blabla",
      "userId": 42,
      "boardId": 1
    }

    To register a new user (returns the user):

    POST /users => Object
    body:
    {
      "username": "blabla",
      "paswword": "verysecure"
    }

    To login an user (returns a list containing the matching users):

    POST /login => [Object]
    body:
    {
      "username": "blabla",
      "paswword": "verysecure"
    }