Comunidad de Intercambio 7 Picos API
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dao
libs
model
rest
restapi
.gitignore
Gruntfile.js
README.md
TODO.md
package.json
phpinfo.php
trades.csv

README.md

#CISP API

catalog

  • /restapi/catalog.php

Requirements for development

PHP (w/ mysql extensions)

Mysql server

sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart

Node/NPM

Grunt

Database connection setup

  • Create a db-profiles.json in root folder to add you database connection properties
    {
      "local": {
        "DB_HOST":"localhost",
        "DB_NAME":"cispdata",
        "DB_USER":"root",
        "DB_PASS":"root"
      },
      "live": {
        "DB_HOST":"xxxx",
        "DB_NAME":"xxxx",
        "DB_USER":"xxxx",
        "DB_PASS":"xxxx"
      }
    }
    
    

Grunt tasks

  • Local development:
    grunt
    
  • Deployment to live:
    grunt ftp_dist
    

TODO

  • Turn queries into prepared statements to avoid SQL injection code
  • Split class.CesRestAPI.inc.php and migrate
  • Decouple models from the database with DAOs: article