GithubHelp home page GithubHelp logo

pkdevboxy / cloudify-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudify-cosmo/cloudify-js

0.0 2.0 0.0 1.71 MB

node js client for the Cloudify REST API

License: Apache License 2.0

JavaScript 99.21% Ruby 0.07% Shell 0.44% HTML 0.27%

cloudify-js's Introduction

cloudify-js

node js client for the Cloudify REST API

  • Master Circle CI

This library is still under development and is not production ready.

Description

A javascript package that supports:

  • JQuery
  • Angular
  • XHR (vanilla javascript)
  • NodeJS

and implements Cloudify3 API.

Other languages

This API implementation follows the guidelines from its python brother

Usage Example

You can have a look at the test/examples folder for an example for each framework.

In nodejs

npm install --save cloudify-cosmo/cloudify-js
var CloudifyClient = require('cloudify-js').CloudifyClient;

var client = new CloudifyClient({'endpoint' : 'http://cloudify.localhost.com'});
var logger = require('log4js').getLogger('index.nodejs');

client.blueprints.list(null, function( err, response, body){
    logger.info('this is body',body);
});

In Vanilla Javascript

bower install --save cloudify-cosmo/cloudify-js
<script src="bower_components/cloudify-js/dist/cloudify.vanilla.js"></script>
<script>
    var client = new window.CloudifyClient({'endpoint': 'http://cloudify.localhost.com'});
    client.blueprints.list(null, function (err, response, body) {
        console.log('this is body', body);
    });
</script>

In Angular

bower intall --save cloudify-cosmo/cloudify-js
<script src="bower_components/cloudify-js/dist/cloudify.angular.js"></script>
<script>
    angular.module('cloudifyjsApp', [ 'cloudifyjs']);
    angular.module('cloudifyjsApp').controller('cloudifyjsCtrl', function($scope, $log, CloudifyClient ){
        var client = new CloudifyClient( { 'endpoint' : 'http://cloudify.localhost.com' } );
        client.blueprints.list( null, function(err, response, body ){
            $log.info('this is body', body);
        });
    });
</script>

In JQuery

bower install --save cloudify-cosmo/cloudify-js
<script src="bower_components/cloudify-js/dist/cloudify.jquery.js"></script>
<script>
    var client = new $.CloudifyClient({'endpoint' : 'http://cloudify.localhost.com'});
    client.blueprints.list( null, function(err, response, body ){
            console.log('this is body', body);
    });
</script>

Dependencies

  • This project uses request and browser-request to get a unified API for ajax calls
  • This project uses browserify to build its front-end artifacts.

Tests

To run the tests on existing cloudify manager, set CLIENT_ENDPOINT environment variable to manager's URL and run grunt test.
To run the tests using vagrant, go to build/vagrant and run vagrant up. The scripts will install cloudify-manager, create proper blueprints and deployments and run the tests automatically.

cloudify-js's People

Contributors

cosmo-admin avatar edenpessach avatar erezcarmel avatar erezgiga avatar fogelomer avatar guy-mograbi-at-gigaspaces avatar kfurmann avatar sefigiga avatar

Watchers

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