Skip to content

MrDeathStroke/glide-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glide API Columns

Deploy with Vercel

To add an API at /api/hello, create the file api/hello.ts with:

import * as glide from "./glide";

export default glide.api(async (params) => {
  const { name } = params;

  // Check that we got a name
  if (name === undefined) {
    return undefined;
  }

  return {
    type: "string",
    value: `Hello, ${name.value}!`,
  };
});

This defines a Glide API endpoint https://<HOST>/api/hello that takes a text value name and returns the text Hello, {name}!, which you would configure in Glide like:

Deploy

Deploy on Vercel:

$ npx vercel

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors