Skip to main content

Getting Started with Godspeed

This guide provides a step-by-step guide to install and get started with Godspeed Meta-Framework. It covers the prerequisites and installation process, both manual and using easy installation scripts. You will learn how to create your first Godspeed project or service and run the development server.

Install Godspeed

The following setup script installs all required prerequisites and the Godspeed runtime components automatically. This simplifies the onboarding process for new users by avoiding manual setup of individual dependencies.

Windows Users

Open Powershell as Administrator and run

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/zero8dotdev/install-godspeed-daemon/main/CompleteInstall.ps1" -OutFile "install.ps1"; Start-Process powershell -ArgumentList "-File .\install.ps1" -Verb RunAs

Mac/Linux Users

curl -fsSL https://raw.githubusercontent.com/zero8dotdev/install-godspeed-daemon/main/CompleteInstall.sh | bash

✅ The Script Will Install:

ComponentPurpose
nvmNode Version Manager - helps switch between Node.js versions
nodeJavaScript runtime (installed via nvm)
npmNode package manager (comes with Node.js)
pnpmEfficient alternative to npm/yarn for managing dependencies
corepackNode’s built-in tool for package manager handling
gitVersion control system - required to clone repositories
godspeed CLICommand-line interface to scaffold, run and manage services
godspeed-daemonCore Godspeed runtime engine that executes workflows

Manual Installation

If you prefer manual setup, follow the steps below:

1. Ensure the Prerequisites are installed:

  • nvm (Node Version Manager)
  • node.js (v18 or higher, installed via nvm)
  • git
  • corepack (comes with Node.js)
  • pnpm (can be enabled via corepack: corepack enable pnpm)

2. Install the Godspeed framework globally:

npm install -g @godspeedsystems/godspeed

Verify Installation

Confirm successful installation:

godspeed --version

Creating and Running Your First Project

Follow these steps to set up and launch your new Godspeed project:

  1. Create a new project:

    godspeed create my-project
  2. Navigate to the project directory:

    cd my-project
  3. Start the development server:

    godspeed serve

Accessing and Testing Your API with Swagger UI

Godspeed automatically generates interactive API documentation using Swagger UI.

  1. Access Swagger UI: The Swagger UI is typically available at:

        http://<BASE_URL>:<PORT>/<http_docs_endpoint>`

    By default, this is:

    http://localhost:3000/api-docs

    If you need to customize the default port (3000) or the Swagger endpoint (/api-docs), you can modify the ./src/eventsources/http.yaml file.

  2. Test the /helloworld API:

    • In the Swagger UI, locate the /helloworld endpoint.
    • Click the Try it out button.
    • You will be prompted to fill in a name parameter. Enter a name (e.g., "John") and send the request.
    • The server will return the following response:
      Hello `John`

Troubleshooting Common Issues

Here are solutions to some common issues you might encounter:

  1. "Running scripts is disabled on this system"

    • Solution: Run PowerShell as Administrator and execute:
      Set-ExecutionPolicy RemoteSigned
  2. "Port Already in Use"

    • Error:
      Error: Port 3000 is already in use
    • Solution: Stop any other services using port 3000, or modify the port in src/eventsources/http.yaml.

Additional Resources