Code Monkey home page Code Monkey logo

invoke-icf's Introduction

invoke-icf

A short sample for invoking an action on the IBM Cloud Functions platform. Although there are plenty of samples on the web showing you how to invoke a microservice via the command line, invoking your microservices with an application isn't usually covered. This code fills that gap.

The code

The code consists of two files: service.js, the service previously deployed to ICF, and service-client.js, the point of this mailbag. To keep things simple, we invoke the service via the npm request module. The request module is one of the most popular npm modules, typically getting 25-30 million downloads a month. It's simple; easy to use; and, if you're a node developer, something you probably know already.

The developerWorks sandbox

The service was deployed to ICF via the developerWorks sandbox. The sandbox lets you run, modify, and re-run code without leaving the browser. Once you're happy with your modified code, you can click the Deploy button to deploy the code to ICF automatically. Once the code is deployed, anyone anywhere in the world can use the URL of your deployed code to invoke your microservice.

For more information

There are two developerWorks tutorials that cover this topic in far more detail:

The first article shows you how to invoke an ICF action via curl, a browser testing tool like Poster, from a node application, and from a Java application.

The second article explains how to write applications that can be deployed to ICF. It has embedded sandboxes inside the article, so you can write and deploy code without leaving the article.

invoke-icf's People

Contributors

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