Public
Like
helloWorld
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
main.tsx
https://jollytoad--5e19809c279d11f09d52569c3dd06744.web.val.run
Hello world server, using http functions.
Try hitting URLs such as: /world, /world.txt, /world.json, /world.html, or even /<script>.html.
This demonstrates how you can import and compose simple functions to construct a router to route based on various aspects of a request, ie. the URL path, method, and even on media-types based on path extension or the Accept
header.
See routing functions, and response helpers on JSR.
For a more detailed guide on building a Deno app, including things like fs based routing, with these fns see... https://jollytoad.deno.dev/blog/http_getting_started