Skip to main content

TurbineGo Quickstart

This quickstart will guide you through how to initialize and run a TurbineGo streaming app project locally on your machine.

Review and complete TurbineGo Setup & Requirements before proceeding.

Initialize a Streaming App Project

First, you will initialize a TurbineGo streaming app project with the Meroxa CLI.

Initialize the TurbineGo streaming app project within the local directory you are currently in by running:

$ meroxa apps init liveapp --lang go

You may define a different local directory path for the TurbineGo streaming app project by using --path /your/local/path/ in your command.

$ meroxa apps init liveapp --lang go --path /your/local/path

If you see the following output from the Meroxa CLI, you have successfully initialized a TurbineGo streaming app!

✔ Application directory created!
✔ Git initialized successfully!
Turbine Data Application successfully initialized!
You can start interacting with Meroxa in your app located at "/your/local/path/liveapp".
Your Application will not be visible in the Meroxa Dashboard until after deployment.

A local streaming app project directory will automatically be created on your local machine, complete with everything you need to build a streaming app with TurbineGo. Including default configuration and installing required npm dependencies. To learn more about the contents of the local streaming app project directory, see App Overview.

Let’s get your TurbineGo streaming app running locally on your machine to demonstrate what you can do with TurbineGo.

Run a Streaming App Locally

Now that you've initialized your TurbineGo streaming app project, we will show you how to run it locally. You don’t need to change any of the TurbineGo boilerplate code provided in the local streaming app project directory.

Navigate to the root of the streaming app project by running cd /your/local/path/liveapp.

Next, run meroxa apps run to run your streaming app locally.

$ meroxa apps run

This will run the TurbineGo streaming app code locally on your machine and show you an output of JSON-formatted data fixtures. The default streaming app should take transactional data containing customer information such has customer_email and anonymize it to something that resembles the following value ~~~1234567890~~~.

If you see the following output, congratulations! You have successfully run a TurbineGo streaming app locally.

=====================to destination resource=====================
{
  id: 9582724,
  category: 'camping',
  product_type: 'sleeping-bag',
  product_name: 'Forte 35 Sleeping Bag - Womens',
  stock: true,
  product_id: 361632,
  shipping_address: '9718 East Virginia Avenue Silver Spring, MD 20901',
  customer_email: '~~~1072928786~~~'
}
{
  id: 9582725,
  category: 'camping',
  product_type: 'sleeping-bag',
  product_name: 'Cosmic 20 Sleeping Bag - Mens',
  stock: true,
  product_id: 235367,
  shipping_address: '881 South Newbridge Lane Upland, CA 91784',
  customer_email: '~~~1067219025~~~'
}
{
  id: 9582726,
  category: 'camping',
  product_type: 'sleeping-bag',
  product_name: 'Zephyr 25 Recycled Sleeping Bag - Kids',
  stock: true,
  product_id: 203000,
  shipping_address: '43 Sunnyslope Street Port Richey, FL 34668',
  customer_email: '~~~1066104848~~~'
}

What's Next?

After you have successfully run a streaming app locally, you can start thinking about using production or test environment data. To do this, you will need to create Resources on the Meroxa Platform.

Create Resources

Resources are configurations used by the Meroxa Platform to connect to the data used in your production or test environments. These configurations can be provisioned using the Meroxa CLI, Dashboard, or Terraform Provider.

A limit of one Source Resource is required for your streaming app. However, you may enrich data records using any number of APIs through secrets. A Destination Resource is both not required or you may have multiple for your streaming app.

For Resource support and instructions on creation, see the Sources & Destinations documentation. Once your Resources are created, you can call and direct your production and test environment data utilizing TurbineGo methods.

Deploy a Streaming App

Meroxa is a Streaming Application Platform that abstracts away the challenging aspects of Kafka such as Connect, topics and partitioning by providing those aspects as a managed service. Developers can use JavaScript to ingest, orchestrate, transform, and stream data to and from anywhere with a developer-first experience aimed to provide agility and participation in data streaming.

To deploy a streaming app to the Meroxa Platform, see the Deployment documentation.