Git Product home page Git Product logo

api-generate's Introduction

Installation notes

  1. Clone the repository

After cloning type the next commands:

cd < Laravel folder >

  1. Configure the Laravel:

IMPORTANT: Copy the .env.example file to the .env and specify all needed data

Set proper DB user and password in .env file and do command

DB settings for .env:

    DB_CONNECTION=mysql
    DB_HOST=db
    DB_PORT=3306
    DB_DATABASE=random
    DB_USERNAME=<username>
    DB_PASSWORD=<password>
    DB_ROOT_PASSWORD=<root password>

run command:

sh ./first_start.sh

NOTE: The script will ask about user's password because it run sudo for some command. Command will generate the application key. Also script do automatic migration with seeder. After this the numbers' table will contain 5 randomized numbers.

Also, the test user will be created with next credentials:

user: admin
email: [email protected]
pass: 'password'
  1. Start with Laravel

  2. PhpMyAdmin

To use PhpMyAdmin just go to URL: localhost:8080

   user: <DB_USERNAME>
   password: <DB_PASSWORD>
  1. Swagger

    Main Swagger page available on localhost:5000/api/v1/documentation. Or press the button on the homepage.

    Api has three part:

    1. Auth - generate the JWT-token used to work with protected URI
    2. With Authentication - used for generate new number and store it to the database. To use it proper token must be provided.
    3. Without Authentication - get the stored number from database by its ID.

From Swagger page one can check all API's functionality.

  1. To do complex tests type the command:

docker exec -it app php artisan test

Test cover as Unit as Feature tests.

api-generate's People

Contributors

lemadior avatar

Watchers

 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.