Giter Site home page Giter Site logo

pismo's Introduction

PISMO

Pismo is an API for creating account transactions

CLONE

$ git clone https://github.com/DiegoSantosWS/pismo.git && cd pismo

CONFIG

To use the API you should check the file docker-compose.yml, on file contains the information connections with the database

ENV

Create the file .env in the principal dir.

PG_HOST=<HOST_DB>
PG_USER=<USER_DB>
PG_PASS=<PASS_DB>
PG_PORT=5432
PG_DB=<DB_NAME>

RUN PISMO

GENERATE IMAGE USING COMMAND DOCKER.

To run the Pismo API you should execute the command below.

$: docker build . -t pismo:latest

The command generates the image docker for the programmer.

Now you need to create the database, you can look config in the file docker-compose.yml, to execute the file you need to run the command below.

To execute all:

$: docker-compose up

You can run each service separately, for example:

$: docker-compose up pismo

To execute the database in the foreground

$ docker-compose up -d postgres

Don't haveing difference on format that you execute, are only formats differents

After of run open the browser or postman and run the endpoints

Run using the sh file

You too can execute the Pismo API using the command sh.

$: sh deploy.sh

This command will to do download of image diegosantosws/pismo, and start all services.

CURL REQUEST

#create account

curl -X POST http://localhost:8080/account
   -H 'Content-Type: application/json'
   -d '{"doc_number":01425836930}'

#create transactions

curl -X POST http://localhost:8080/transactions
   -H 'Content-Type: application/json'
   -d '{"account_id":1,"operations_types_id":4,"amount":7800.00}'

curl -X GET http://localhost:8080/account/1

Result

{
    "id": 1,
    "doc_number": "05769904496",
    "created_at": "2022-10-05T19:08:05.034872Z"
}

pismo's People

Contributors

diegosantosws avatar

Stargazers

 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.