val-town-docs icon indicating copy to clipboard operation
val-town-docs copied to clipboard

Create Val Town Guide on feTS docs site

Open stevekrouse opened this issue 1 year ago • 3 comments

https://github.com/ardatan/feTS/issues/1016

stevekrouse avatar Jan 04 '24 17:01 stevekrouse

FeTS server example that works with Val Town:

import { createRouter, Response } from "npm:fets";

const router = createRouter().route({
  method: "GET",
  path: "/greetings",
  schemas: {
    responses: {
      200: {
        type: "object",
        properties: {
          message: {
            type: "string",
          },
        },
        required: ["message"],
        additionalProperties: false,
      },
    },
  },
  handler: () => Response.json({ message: "Hello World!" }),
});

export default router.fetch;

Xkonti avatar Jan 16 '24 19:01 Xkonti

@Xkonti - sorry I wasn't clear, this ticket is a mirror of the ticket ont he feTS docs site. I wanted you to submit a pull request to their docs not ours. Could you do that?

I'll unlink this ticket from your PR and merge that. It's still a great addition to our docs. Thanks!

stevekrouse avatar Jan 25 '24 17:01 stevekrouse

@stevekrouse Sure thing!

Xkonti avatar Jan 25 '24 18:01 Xkonti