DocumentationFirst Endpoint

First Endpoint

Create and deploy your first secure execution endpoint.

Let's create a simple "Hello World" endpoint that returns a JSON response.

Create Endpoint FileStep 01

Create a new file in your FusePlane endpoints directory (default: `api/fuseplane`).

api/fuseplane/hello.ts
1import { FusePlaneEndpoint } from '@fuseplane/core';
2
3export default FusePlaneEndpoint({
4 async run(context) {
5 return {
6 message: "Hello from FusePlane!",
7 timestamp: new Date().toISOString()
8 };
9 }
10});

Test LocallyStep 02

Ensure your dev server is running (`fuseplane dev`) and curl the endpoint.

Terminal
1curl http://localhost:8787/hello
{ "message": "Hello from FusePlane!", "timestamp": "2023-10-27T10:00:00.000Z" }