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:
Component | Purpose |
---|---|
nvm | Node Version Manager - helps switch between Node.js versions |
node | JavaScript runtime (installed via nvm) |
npm | Node package manager (comes with Node.js) |
pnpm | Efficient alternative to npm/yarn for managing dependencies |
corepack | Node’s built-in tool for package manager handling |
git | Version control system - required to clone repositories |
godspeed CLI | Command-line interface to scaffold, run and manage services |
godspeed-daemon | Core 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:
-
Create a new project:
godspeed create my-project
-
Navigate to the project directory:
cd my-project
-
Start the development server:
godspeed serve
Accessing and Testing Your API with Swagger UI
Godspeed automatically generates interactive API documentation using Swagger UI.
-
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. -
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`
- In the Swagger UI, locate the
Troubleshooting Common Issues
Here are solutions to some common issues you might encounter:
-
"Running scripts is disabled on this system"
- Solution: Run PowerShell as Administrator and execute:
Set-ExecutionPolicy RemoteSigned
- Solution: Run PowerShell as Administrator and execute:
-
"Port Already in Use"
- Error:
Error: Port 3000 is already in use
- Solution: Stop any other services using port
3000
, or modify the port insrc/eventsources/http.yaml
.
- Error:
Additional Resources
-
Godspeed CLI Help: To see a list of available Godspeed commands, use:
godspeed --help
Refer to the full CLI spec for more detailed information, including how to add plugins for eventsources and datasources