Public | Automated Build

Last pushed: 5 months ago
Short Description
MySQL DB to RESTful API
Full Description

DB to API

docker-compose.yml file example:

version: "2"

services:

  app:
    image: reduardo7/db-to-api
    environment:
      DB_HOST: "db-host"
      DB_USER: "root"
      DB_PASS: "root"
      DB_DATABASE: "app"
    links:
      - db:db-host

  db:
    image: mysql
    hostname: db
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=app
      #- "13306:3306"
    volumes:
      - ./.data/db:/var/lib/mysql
      #- ./db:/docker-entrypoint-initdb.d

Doc

Examples

List

curl -X GET "http://localhost:3000/api/product"

Save

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'description=Test 2&code=987654321' "http://localhost:3000/api/product"
Docker Pull Command
Owner
reduardo7
Source Repository

Comments (0)