Giter VIP home page Giter VIP logo

acilia_api_rest's Introduction

Acilia API REST

About

This repository contains all necessary code in order to run the Acilia Api REST as part of a tecnical challenge

Development

The project is built with a several libraries as follow:

  • composer create-project symfony/skeleton:"^4.4" acilia_api_rest
  • composer require symfony/orm-pack (database conections)
  • composer require annotations (route annotations)
  • composer require symfony/maker-bundle --dev (entty creator)
  • composer require symfony/twig-bundle (templates)
  • composer require symfony/asset
  • composer require nelmio/api-doc-bundle (api documentation)
  • composer require trikoder/oauth2-bundle nyholm/psr7 (oauth2 authentication/authorization)
  • composer require --dev symfony/phpunit-bridge (testing)
  • composer require --dev symfony/browser-kit symfony/css-selector
  • composer require symfony/validator

Running the project

This project requires postgres database with postgres user with postgres password to running in the system. If you want other database engine just modify .env file

Clone the repository and access to folder created, run composer, create database, schema and start server

git clone https://github.com/sebardo/acilia_api_rest.git
cd acilia_api_rest
composer install
./bin/console doctrine:database:create
./bin/console doctrine:schema:create
symfony server:start

Generating Crypto Keys

In order to enable the OAuth authentication flow a public/private keypair must be generated. Under root directory /, run:

openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key

Now can create OAuth client

./bin/console trikoder:oauth2:create-client

Add CLIENT_ID and CLIENT_SECRET returned by command above on phpunit.xml.dist file

PHPUNIT

Enjoy it!

Now you can visit API REST documentation page and testing category and product endpoints at https://127.0.0.1:8000/api/doc

APIREST

Testing

Can run testing to check all work well

./bin/phpunit

Testing

Author

Dario Sebastian Sasturain 4/2021

acilia_api_rest's People

Contributors

sebardo avatar

Watchers

James Cloos avatar  avatar

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.