Home ci 38. functions: Epycbyte Functions Quickstart

38. functions: Epycbyte Functions Quickstart

Last updated on Aug 05, 2025

Epycbyte Functions Quickstart Guide

Overview

Epycbyte Functions provide a powerful way to create and deploy serverless functions. This guide will help you get started with creating, testing, and deploying your first function using Epycbyte.

Prerequisites

  • Ensure you have the latest version of the Epycbyte CLI installed.
    • To check: epycbyte --version
    • To install/update: pnpm i -g epycbyte@latest or npm install -g epycbyte@latest

Creating Your First Function

Choose a Framework

  • Use your favorite frontend framework (e.g., Next.js, SvelteKit) or no framework at all.

Create a New Project

If you don't have an existing project:

npx create - next - app@latest --typescript

Select a Runtime

  • Epycbyte automatically uses Serverless Node.js if not specified.
  • To specify a runtime, add this to your function file:
    export const runtime = 'nodejs'; // or 'edge'
    

Implement Your Function

  • For Next.js: Create /api/hello/route.ts
    export function GET(request: Request) {
      return new Response(`Hello from ${process.env.epycbyte_REGION}`);
    }
    
  • For other frameworks, follow similar steps.

Test Locally

npm run dev
  • Visit /api/hello to see the response. Note: epycbyte_REGION won't be defined locally.

Deploying Your Function

Push Changes

  • If already deployed, push changes to your Git repo.
  • If not deployed, create a new project via Epycbyte CLI or dashboard.

Use Environment Variables

epycbyte env pull
  • This fetches latest environment variables for your function.

More Resources

Feedback

We'd love to hear your feedback on improving this guide. Reach out via support@epycbyte.com.