# Get started

Liteflow is a toolkit for developers to build applications efficiently. Liteflow is centered around the concept of processes that connect different services. Processes can connect events from a service to a series of tasks from other services. Check out the Liteflow website to learn more and see what it can do for you.

We’ll start by showing you how to create an application with a single feature that calls a Javascript function when there is an HTTP request.

# 1. Installation

Run the following command in a console to install the Liteflow CLI:

npm install -g @liteflow/cli

# 2. Create your function

In order to create an application, run the following command:

// myfunction.js
module.exports = (inputs) => {
  const name = inputs.body.name;
  return {
    greetings: `hello ${name || "world"}`,
  };
};

# 3. Connect your function to an HTTP endpoint

Create a new process that creates an HTTP endpoint and connect each requests on this endpoint to your function.

# process.yml
name: my-cloud-function
steps:
  - type: trigger
    endpointKey: my-endpoint
  - type: task
    handler: ./myfunction.js

# 4. Deploy your application

To deploy on Liteflow, make sure to be logged into the CLI with liteflow login and use the following command:

liteflow deploy

The command will automatically deploy your process and create a dedicated HTTP endpoint for you to use.

To trigger your process, execute the command (don't forget to replace the following URL with the one generated for you):

curl -XPOST https://gateway.liteflow.com/xxxxxxxx --data name=my-name

From now on, your process will run autonomously without having to manage any server or infrastructure.

TIP

You can anytime run your application locally before publishing by using the command liteflow dev.