Skip to content

svp1989/symfony-api-skeleton

Repository files navigation

symfony-api-skeleton

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

Installation

1. Clone repository

Create project :

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

Or clone repository from GitHub:

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

2. Dependencies installation

Install all needed dependencies:

composer install

3. Create JWT auth keys

Create JWT auth keys and configure .env:

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:

cp .env.dist .env

5. Create database

Create database and upload fixtures:

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:

bin/console server:start

Authorisation

Go to route /api/login:
ROLE_USER:
--username:user
--password:user

ROLE_ADMIN
--username:admin
--password:admin

About

rest api skeleton based on symfony-flex, api-platform, fosuserbundle etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy