Giter Site home page Giter Site logo

symfony-api-skeleton's Introduction

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

symfony-api-skeleton's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

cristiantrif

symfony-api-skeleton's Issues

Error

Installing svp1989/symfony-api-skeleton (dev-master 1975469)

  • Installing svp1989/symfony-api-skeleton (dev-master 1975469): Cloning 1975469 from cache
    Created project in fillform
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for symfony/security v3.4.7 -> satisfiable by symfony/security[v3.4.7].
- don't install symfony/security-core v4.0.7|don't install symfony/security v3.4.7
- Installation request for symfony/security-core v4.0.7 -> satisfiable by symfony/security-core[v4.0.7]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.