2017 © Pedro Peláez
 

project symfony-api-skeleton

Symfony api skeleton based on symfony-flex, api-platform, JWT etc.

image

svp1989/symfony-api-skeleton

Symfony api skeleton based on symfony-flex, api-platform, JWT etc.

  • Thursday, April 19, 2018
  • by svp123
  • Repository
  • 1 Watchers
  • 5 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

symfony-api-skeleton

JSON REST API simple skeleton based on symfony-flex, JWT, api-platform, fosuserbundle etc., (*1)

Installation

1. Clone repository

Create project :, (*2)

composer create-project svp1989/symfony-api-skeleton:@dev

Or clone repository from GitHub:, (*3)

git clone https://github.com/svp1989/symfony-api-skeleton.git

2. Dependencies installation

Install all needed dependencies:, (*4)

composer install

3. Create JWT auth keys

Create JWT auth keys and configure .env:, (*5)

ssh-keygen -t rsa -b 4096 -f private.pem
openssl rsa -in private.pem -pubout -outform PEM -out public.pem

4. Configuration

Create .env file, which contains all the necessary environment variables that application needs:, (*6)

cp .env.dist .env

5. Create database

Create database and upload fixtures:, (*7)

bin/console doctrine:database:create 
bin/console doctrine:schema:create
bin/console doctrine:fixtures:load

6. Start server

Start server and open in the browser http://127.0.0.1:8000/api/doc:, (*8)

bin/console server:start

Authorisation

Go to route /api/login:
ROLE_USER:
--username:user
--password:user
, (*9)

ROLE_ADMIN
--username:admin
--password:admin
, (*10)

The Versions