Giter VIP home page Giter VIP logo

jsnews's Introduction

Jsnews

Installation

Vous devez avoir installé nodejs et npm sur votre machine : https://www.npmjs.com/get-npm Positionnez vous sur le dossier backend à partir du projet

> cd ./backend/

Ensuite, installez les composants du projet.

> npm install

Vous pouvez maintenant lancer le projet en local pour l'utiliser

> node server

Le serveur sera accessible sur http://localhost:4000 par défaut.

Un fichier Jsnews.json est présent dans le dossier backend du repository, il sert à configurer l'outil Talend Api Tester pour envoyer des requêtes http vers le serveur.

Vous pouvez télécharger cette extension pour google chrome ici : https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm

Ce fichier de configuration peut aussi être chargé dans Postman, mais il peut y avoir des problèmes de compatibilité.

API

Il y a actuellement 3 api sur le serveur :

Elles traitent toutes des articles. Un article est au format suivant :

{
   "id" : int,
   "title": string,
   "publicationDate" : string,
   "image" : string,
   "content" : string
}

GetAll

GET /api/article

Récupération des articles Format de retour :
[

   {article},    ... ]

GetById

GET /api/article/:id

Récupération d'un article par son id Format de retour :
{article}

GetFavorites

POST /api/article/
@body
{
    "favorites": [id]
}

Récupération des articles favoris (non triés)
Format de retour :
[

   {article},    ... ]

jsnews's People

Contributors

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