Skip to content
This repository has been archived by the owner on Dec 6, 2020. It is now read-only.

jlagneau/demo-rest-api

Repository files navigation

Demo REST API

SensioLabsInsight Build Status Coverage Status StyleCI


This is a simple symfony3 demo of a REST API for a blog.

Install and run

Inside the directory:

$ curl -sS https://getcomposer.org/installer | php
$ mkdir var/jwt

# change "passphrase" by the passphrase you desire and edit it in the parameters.yml file
$ openssl genrsa -passout pass:passphrase -out var/jwt/private.pem -aes256 4096
$ openssl rsa -passin pass:passphrase -pubout -in var/jwt/private.pem -out var/jwt/public.pem
$ php composer.phar install

Change configurations in app/config/parameters.yml if needed and run :

$ php bin/console doctrine:database:create
$ php bin/console doctrine:schema:create

# If you want to load some fixtures
$ php bin/console doctrine:fixtures:load --no-interaction

Now you can start the server (for development only) :

$ php bin/console server:start

API doc

see http://localhost:8000/app_dev.php/ once the webserver is started.

Tests

$ phpunit

About

REST API demo with symfony3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published