Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 849 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 849 Bytes

newsreader-backend

RSS News Reader back-end build with Symfony

Installation

# Installation des vendors
composer install

# Création de la base de données
php bin/console doctrine:database:create
php bin/console doctrine:schema:update --force
php bin/console doctrine:fixtures:load

# Création d'une paire de clés pour JWT
php bin/console lexik:jwt:generate-keypair

Usage

Get a JWT Token

curl -s -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"username":"admin","password":"admin"}' http://127.0.0.1:8000/api/authentication_token

Replace admin / admin with your credentials

Make a API request to get feeds

curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" http://127.0.0.1:8000/api/feeds

Replace ${TOKEN} with the JWT token