Getting Started

In this tutorial we will:

  1. Install Reshuffle

  2. Run a Hello World example

  3. Create a Reshuffle app

Installation

Reshuffle is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 12 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install reshuffle

Done!

If you are familiar with npm, and are an advanced node programmer, you can skip the rest of this page, and go straight to our examples and connectors documentation.

Run a Hello World example

This Hello World code is a super simple example on how to use Reshuffle.

const { HttpConnector, Reshuffle } = require('reshuffle')

const app = new Reshuffle()

const connector = new HttpConnector(app)

connector.on({ method: 'GET', path: '/test' }, (event, app) => {
  event.res.end('Hello World!')
})

app.start()

Create or copy the HTTPExample.js into your own /example folder.

Init npm:

$ npm init

Note: No need to change the init wizard defaults

Install Reshuffle:

$ npm install reshuffle

Run

$ node HTTPExample.js

got to http://localhost:8000/test

Done! More examples can be found in the /examples folder

Create your own app - add connectors to your Reshuffle app

Reshuffle apps are all about integrating 3rd party service and creating workflows out of them.

Connectors are NPM packages, so you can install connectors to 3rd party systems, or create your own connector to your own home grown system