GithubHelp home page GithubHelp logo

rider-driver-api's Introduction

Technical test - Documentation

The following are the steps to be followed to execute the project locally

Nest js & MySQL

Make sure you have Node.js and MySql installed.

Database connection - MySQL 8.0.31

  HOST  : localhost
  PORT  : 3306
  USERNAME  : root
  PASSWORD  : 123456
  DATABASE : test

Installation

Install rider-driver-api

  $ git clone https://github.com/carlospalominopro/rider-driver-api.git

  $ cd rider-driver-api
  
  rename file .env.local to .env in root folder
  run SLQ script (init-database.sql) located in /db folder
  
  $ npm install
  $ npm run start:dev

API Reference

Note : The use of POSTMAN is recommended, in root folder


01 - Get token (acceptance_token)

  POST /api/get-token
Parameter
No parameters required

02 - Request driver (The rider request a driver)

  POST /api/request/create
Parameter Type Description Example
rider_id int Required. Rider ID from DB Table - rider 1
latitude float Required. Rider's Latitude 4.608839965578942
latitude float Required. Rider's Longitude -74.07642114458059

03 - Transaction Create (The driver ends the trip)

  POST /api/transaction/create
Parameter Type Description Example
idRequest int Required. Request ID from DB Table - request 1
latitude_end float Required. End Latitude 4.639332056323714
longitude_end float Required. End Longitude -74.12114860195318

Test

  $ npm run test

Author : Carlos Palomino - 2023

rider-driver-api's People

Contributors

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