Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Val Town Guide on feTS docs site #89

Open
stevekrouse opened this issue Jan 4, 2024 · 3 comments
Open

Create Val Town Guide on feTS docs site #89

stevekrouse opened this issue Jan 4, 2024 · 3 comments

Comments

@stevekrouse
Copy link
Contributor

ardatan/feTS#1016

@Xkonti
Copy link
Contributor

Xkonti commented Jan 16, 2024

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;

@stevekrouse
Copy link
Contributor Author

@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!

@Xkonti
Copy link
Contributor

Xkonti commented Jan 25, 2024

@stevekrouse Sure thing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Now
Development

No branches or pull requests

2 participants