Giter Site home page Giter Site logo

snm07 / cm_12_04022022_backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openclassrooms-student-center/p9-front-end-dashboard

0.0 0.0 0.0 166 KB

Code for project 9 of the front-end path: a sports analytics dashboard.

Dockerfile 0.87% JavaScript 99.13%

cm_12_04022022_backend's Introduction

Project 12 - SportSee Front-end Dashboard

This repo contains all the source code to run the micro API for the sports analytics dashboard SportSee.

1. Project

1.1 Prerequisites

If you are working with several versions of NodeJS, we recommend you install nvm. This tool will allow you to easily manage your NodeJS versions.

1.2 Launching the project

  • Fork the repository
  • Clone it on your computer.
  • The yarn command will allow you to install the dependencies.
  • The yarn dev command will allow you to run the micro API.

2. Endpoints

2.1 Possible endpoints

This project includes four endpoints that you will be able to use:

  • http://localhost:3000/user/${userId} - retrieves information from a user. This first endpoint includes the user id, user information (first name, last name and age), the current day's score (todayScore) and key data (calorie, macronutrient, etc.).
  • http://localhost:3000/user/${userId}/activity - retrieves a user's activity day by day with kilograms and calories.
  • http://localhost:3000/user/${userId}/average-sessions - retrieves the average sessions of a user per day. The week starts on Monday.
  • http://localhost:3000/user/${userId}/performance - retrieves a user's performance (energy, endurance, etc.).

Warning, currently only two users have been mocked. They have userId 12 and 18 respectively.

2.2 Examples of queries

  • http://localhost:3000/user/12/performance - Retrieves the performance of the user with id 12
  • http://localhost:3000/user/18 - Retrieves user 18's main information.

cm_12_04022022_backend's People

Contributors

tdimnet avatar snm07 avatar nicolaspatschkowski avatar ccorazza-opc 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.