Install Guide

Here’s a quick guide to installing M3O

Clients

CLI

Install the m3o cli

## follow the instructions
curl -fssl https://install.m3o.com/cli | /bin/bash

To use the helloworld service

export M3O_API_TOKEN=xxxx

m3o helloworld call --name=Alice

Javascript

Install the m3o js client

npm install m3o

To use the helloworld service

const { HelloworldService } = require("m3o/helloworld");

const helloworldService = new HelloworldService(process.env.M3O_API_TOKEN);

// Call returns a personalised "Hello $name" response
async function callTheHelloworldService() {
  const rsp = await helloworldService.call({
    name: "Alice",
  });
  console.log(rsp);
}

callTheHelloworldService();

Go

Install the m3o go client

go get go.m3o.com

To use the helloworld service

package main

import (
    "fmt"
    "os"

    "go.m3o.com/helloworld"
)

function main() {
    helloworldService := helloworld.NewHelloworldService(os.Getenv("M3O_API_TOKEN"))

    rsp, err := helloworldService.Call(&helloworld.CallRequest{
	      "Name": "Alice",
    })

    fmt.Println(rsp.Message)
}