Xanny finally reached version 1.0 in Dec 2020. According to its official repository, Xanny is a simple, fast and low HTTP router and URL marcher for building Deno servers.
You can assume Xanny as a layer built on the top of the Deno that helps manage a server and routes. It provides a robust set of features to develop web and mobile applications.
Let's see some of the core features of Xanny framework:
Assuming you’ve already installed Deno, create a directory and
.ts
file to hold your code, and make that your working directory.$ mkdir xanny-app
$ cd xanny-app
$ touch xanny_example.ts
So to use version 1.0.0 of xanny, you would want to import
https://deno.land/x/[email protected]/lib/mod.ts
Let's start registering a couple of URL paths and handlers:
Here we register two routes mapping URL path to handler. if an incoming request URL matches one of the paths, the corresponding handler is called passing.
We believe development must be an enjoyable and creative experience to be truly fulfilling (
HttpRequest
, HttpResponse
) as parameters.As you can see Xanny provides a very simple and expressive method of defining routes and behavior without complicated routing.
To see the results you need to start a web server on your development machine.
You can do this by running the following command in the
xanny-app
directory:deno run --allow-net xanny_example.ts
To see your application in action, open a browser window and navigate to http://localhost:8080. You should see the Xanny
Hello Xanny.
We encourage you to contribute to Xanny! Please check out the guidelines about how to proceed.
Whether you’re helping us fix bugs, improve the docs, or spread the word, we’d love to have you as part of the Xanny community! 💪💜 See CONTRIBUTING.md for more information on what we’re looking for and how to get started.