Coder Social home page Coder Social logo

flogo-cli's Introduction

Serverless functions and edge microservices made painless

Installation | Getting Started | Repos | Contributing | License


Project Flogo is an open source framework to simplify building efficient & modern serverless functions and edge microservices and _this_ is the cli that makes it all happen.

Installation

Prerequisites

To get started with the Project Flogo cli you'll need to have a few things

  • The Go programming language version 1.8 or later should be installed.
  • The GOPATH environment variable on your system must be set properly
  • In order to simplify dependency management, we're using go dep. You can install that by following the instructions here.

Install the cli

To install the cli, simply open a terminal and enter the below command

$ go get -u github.com/TIBCOSoftware/flogo-cli/...

Note that the -u parameter automatically updates the cli if it exists

Build the cli from source

You can build the cli from source code as well, which is convenient if you're developing new features for it! To do that, follow these easy steps

# Get the flogo-cli from GitHub
$ go get github.com/TIBCOSoftware/flogo-cli/...

# Go to the right directory
$ cd $GOPATH/src/github.com/TIBCOSoftware/flogo-cli

# Optionally check out the branch you want to use 
$ git checkout my_branch

# Run the install command
$ go install ./... 

Getting started

Getting started should be easy and fun, and so is getting started with the Flogo cli.

First, create a file called flogo.json and with the below content (which is a simple app with an HTTP trigger)

{
  "name": "myApp",
  "type": "flogo:app",
  "version": "0.0.1",
  "description": "My flogo application description",
  "triggers": [
    {
      "id": "my_rest_trigger",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
      "settings": {
        "port": "9233"
      },
      "handlers": [
        {
          "actionId": "my_simple_flow",
          "settings": {
            "method": "GET",
            "path": "/test"
          }
        }
      ]
    }
  ],
  "actions": [
    {
      "id": "my_simple_flow",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow",
      "data": {
        "flow": {
          "attributes": [],
          "rootTask": {
            "id": 1,
            "type": 1,
            "tasks": [
              {
                "id": 2,
                "type": 1,
                "activityRef": "github.com/TIBCOSoftware/flogo-contrib/activity/log",
                "name": "log",
                "attributes": [
                  {
                    "name": "message",
                    "value": "Simple Log",
                    "type": "string"
                  }
                ]
              }
            ],
            "links": [
            ]
          }
        }
      }
    }
  ]
}

Based on this file we'll create a new flogo app

$ flogo create -f flogo.json myApp

From the app folder we can build the executable

$ cd myApp
$ flogo build -e

Now that there is an executable we can run it!

$ cd bin
$ ./myApp

The above commands will start the REST server and wait for messages to be sent to http://localhost:9233/test. To send a message you can use your browser, or a new terminal window and run

$ curl http://localhost:9233/test

For more tutorials check out the Labs section in our documentation

Repos

Project Flogo consists of the following sub-projects available as separate repos:

Contributing

Want to contribute to Project Flogo? We've made it easy, all you need to do is fork the repository you intend to contribute to, make your changes and create a Pull Request! Once the pull request has been created, you'll be prompted to sign the CLA (Contributor License Agreement) online.

Not sure where to start? No problem, here are a few suggestions:

  • flogo-contrib: This repository contains all of the contributions, such as activities, triggers, etc. Perhaps there is something missing? Create a new activity or trigger or fix a bug in an existing activity or trigger.
  • Browse all of the Project Flogo repositories and look for issues tagged kind/help-wanted or good first issue

If you have any questions, feel free to post an issue and tag it as a question, email [email protected] or chat with the team and community:

  • The project-flogo/Lobby Gitter channel should be used for general discussions, start here for all things Flogo!
  • The project-flogo/developers Gitter channel should be used for developer/contributor focused conversations.

For additional details, refer to the Contribution Guidelines.

License

Flogo source code in this repository is under a BSD-style license, refer to LICENSE

flogo-cli's People

Contributors

emilienthomas avatar lixingwang avatar mellistibco avatar mr-tibco avatar pdhar-tibco avatar retgits avatar rkozhikk avatar torresashjian avatar vijaynalawade avatar vnalawad-tibco avatar zhili-tibco 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.