Groundfloor Docs

Quick start

Sign in and deploy your first function in about five minutes.

In this guide you sign in, write a small Node.js function, deploy it with Coderunner and call it. It takes about five minutes.

Before you start

  • An invitation. Groundfloor is invite-only: someone in your organization invites you from Team in the Client Portal. If your company isn't on Groundfloor yet, contact the Groundfloor team.
  • Writer, Admin or Owner role in a workspace. Members and Partners can only view. Your inviter can change your role; see Members and roles.
  • Node.js 20 or later on your computer, if you want to use the CLI.

1. Sign in

Open the link in your invitation, or go to console.groundfloor.cloud and sign in. Choose a workspace with the workspace picker at the top of the page.

2. Write a function

Create a folder with two files.

handler.js
const handler = async (context, payload) => {
  return {
    statusCode: 200,
    body: { message: `Hello, ${payload?.name ?? "world"}!` },
    headers: { "content-type": "application/json" },
  };
};

module.exports = { handler };
package.json
{
  "name": "hello-groundfloor",
  "version": "1.0.0",
  "main": "handler.js",
  "scripts": { "start": "node handler.js" }
}

That's the whole function. You don't write a web server: Coderunner calls handler for every request and returns what it returns.

3. Deploy it

Zip the folder

Zip the two files so they sit at the root of the archive, not inside a folder:

zip hello.zip handler.js package.json

Create a Coderunner

In the sidebar, go to Build → Coderunner and create one. Give it a name, choose Node.js and the Function type.

Upload and deploy

Upload hello.zip. When the build finishes, deploy the new version.

npm install -g @groundfloorcloud/cli
gf login              # opens your browser to sign in
gf workspaces                     # list your workspaces
gf workspaces use <workspace-id>

From inside the folder with your two files:

gf deploy --name hello --runtime node --workload-type function

gf deploy creates the Coderunner, uploads your code, waits for the build, deploys it and prints the Function's URL.

4. Call it

Open your Coderunner and use Run with this input:

{ "name": "Ada" }
gf coderunner run -c hello --payload '{"name":"Ada"}'

Or call its URL directly, with your own token:

curl -X POST "<function-url>" \
  -H "Authorization: Bearer $(gf token)" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ada"}'

Check that it worked

The response includes your message, Hello, Ada!.

If something went wrong, open Observe → Process Log in the Client Portal to see your function's output and errors.

Next steps

  • Core concepts — what organizations, workspaces and environments are.
  • Deploy — Jobs, Schedules, Services, and the other languages: Python, .NET, Go and Rust.
  • M2M tokens — call your function from another server.

On this page