Git Product home page Git Product logo

vitality's Introduction

Open Source Vitality

INSTALLING

git clone https://github.com/JacquesPerrault/vitality.git
git remote add upstream https://github.com/JacquesPerrault/vitality.git
git pull upstream master
npm install -g swagger
npm install

DOCUMENTATION

You can view and modify documentation immediately after following the INSTALLING instructions; simply enter the following at the command line: swagger project edit

RUNNING

Before you run for the first time

  1. Create a copy of /public/javascript/orgs-sample.js, then add projects using the format in the sample file. GitHub orgs will not work at this time.
  2. Create a copy of /config/config-sample.js, then replace the values in square brackets [] with actual values.
  3. Modify the appConfig and orgs variables in server.js to point at the files you created in steps 1 & 2.
  4. Create and initialize the database (instructions TBD)
  5. remote hosts only Modify the host attribute in /swagger/api/swagger.yaml to point at the host (name or ip) serving the API
  6. Execute the following at the command line: swagger project start

CONSUMING

Vitality supports cross-domain requests. The code below demonstrates how to make a cross domain request using jQuery:

var callback = function(data) {  
  data = $.parseJSON(data);
  if (data.success) {
    $.each(data, function (i, d) {  
      // do something with the data(d)  
    }  
  } else {
    errorcallback(data)
  }
)}    
var errorcallback = function(error) {  
  // handle the error  
  return false;  
}   
var url = 'whatever.endpoint.you.want';  
var jqxhr = $.ajax({  
  url: url,  
  dataType: "jsonp",  
  crossDomain: true,  
  data: '',  
  success: callback
})

The Vitality API will always return a status code of 200.
It is up to the developer to check the value of the success attribute of the response object to test for success or failure.
Refer to the endpoint documentation for details.

TO CREATE A NEW FEATURE/FIX

git stash
git pull upstream master
git checkout -b meaningful-name-of-branch
git stash pop
git add -p
git commit -m "meaningful message"
git push -u origin meaningful-name-of-branch   (-u is only needed the first time)

Then create a new Pull Request pointing at the branch to be merged.

vitality's People

Contributors

jacquesperrault avatar

Stargazers

Eugene Brodsky avatar Surya Singh avatar Hasan Topcu avatar Ian Oeschger avatar

Watchers

 avatar James Cloos avatar Ian Oeschger avatar Manuel Silveyra avatar

Forkers

mpierre0220

vitality's Issues

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.