Skip to content

A small Symfony application (Symfony 5.3) composed of an API and a frontend developed with the Twig template engine. The posts and authors are obtained from the external API https://jsonplaceholder.typicode.com

Notifications You must be signed in to change notification settings

davidgpgr94/symfony-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Symfony blog

A small Symfony application (Symfony 5.3) composed of an API and a frontend developed with the Twig template engine.

The posts and authors are obtained from the external API https://jsonplaceholder.typicode.com

API Reference

Get all posts

  GET /api/posts

Get a post

  GET /api/posts/${id}
Parameter Type Description
id integer Required. Id of post to fetch

Get the post author

  GET /api/posts/${id}/author
Parameter Type Description
id integer Required. Id of post from which fetch the author

Get all authors

  GET /api/authors

Get an author

  GET /api/authors/${id}
Parameter Type Description
id integer Required. Id of author to fetch

Frontend Reference

Get all posts

  GET /
  GET /posts

Get a post with its author

  GET /posts/${id}
Parameter Type Description
id integer Required. Id of post to fetch

Usage/Examples

A docker-compose.yml has been prepared with an nginx and a docker image of php 7.4.

For the first run

docker-compose up -d
docker-compose exec php composer install

The following executions will only require the first command.

Running Tests

To run tests, run the following command having the containers running.

    docker-compose exec php bin/phpunit

About

A small Symfony application (Symfony 5.3) composed of an API and a frontend developed with the Twig template engine. The posts and authors are obtained from the external API https://jsonplaceholder.typicode.com

Topics

Resources

Stars

Watchers

Forks