Davaux has begun to mature somewhat. It is now a full featured web server, with built-in support for middleware such as CORS, cookies, JWT, sessions, authentication, and others. It's still possible to run it with no configuration, as it adjusts middleware settings based on the environment, but you can also choose presets for different deployment types and security levels. Currently, you can even build an app and just run the Davaux server package directly from npm to run the server, you don't even have to import it anyway.
It still doesn't require compiling anything, is runs as ESM on the server, and it has no dependencies, outside of it's own packages. It serves browser-ready HTML, CSS, and Javascript, with built-in reactivity, there's no bundling or large file transfers. This means it is responsive on any device and can run on any server that can run node.js. In my tests, even pages with a heavy load of reactivity, the total served file sizes are just under 50K.
It has a full featured router for serving any request type and built in layout handling that supports the same nesting as routes. You simply add a Javascript file in the pages folder, or within a deeper folder, and that's your first route. If it contains a GET function, it serves a page, if it has a POST function, it serves an API, if it has both it does both. No additional configuring of routes is necessary, it just works. Layouts work the same way, except they go in a layouts folder and return a template.
My focus recently was getting the middleware built-in and working by default. I've also taken care to make it all work as simple as possible. If you know Javascript, HTML, and CSS, you already know how to use it. Now that I'm happy with that, I'll be working toward full stack territory. I want to be able to server MPAs (what it does currently), SPAs, APIs (also currently), and generate Static sites, with or without built-in API support. It sounds like a lot, but I've put careful thought into the architecture in an attempt to easily make anything possible. I'll actually be focusing on the Static site generation next, as I think that is likely a market in need.
This is all going to be open source, I just haven't released anything yet. I want it to be as perfect as possible and I want to have the Davaux website/documentation online before anyone else uses it. It's about keeping it simple and letting developers focus on building and deploying, not tooling.
David D.
No Comments