GithubHelp home page GithubHelp logo

temp_button_ah's Introduction

This project is intended to be used only for the purpose of assignment evaluation by Temp Button.

Problem Statement

Table: Users

Endpoints: POST /login GET /users (JWT)

Test Cases:

  1. Get all users with token
  2. Can't get all users without token

Laravel + Docker


This is a laravel project, and exposes 2 REST endpoints

/api/login
/api/users

It uses Laravel Passport for JWT generation, and automatically generates the required RSA keys, which can be found inside the storage folder. MySql for database, and Nginx for webserver w/ php-fpm.

Copy .env.example to create a .env file at / and /temp-button

As this project is dockerized, it's required that Docker Compose and Docker Cli is installed on the host machine.

To run this project, RUN:

docker-compose up

And wait for the process to spin up the required infra. Upon success you should get a similar output screen on your terminal.

temp-button-service | PHP 8.1.4 Development Server (http://127.0.0.1:8000) started

After this, the hit the above endpoints ensuring that Header: Accept: application/json is being passed in the both endpoints.

A postman collection around the endpoints can be found here Postman Collection

*If you face shell script issue - Output of docker-compose stating error of Command Not Found or similar - Please change the EOL sequence to LF for the files at /temp-button/start.sh & /temp-button/wait_for.sh

temp_button_ah's People

Contributors

viveksingh801 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.