Akeno is a really fast, modular server, primarily intended for:
- Efficient APIs
- Static and dynamic web sites/apps
- Realtime web apps
- Content delivery
- User management
It supports various configurations for HTTP, HTTPS, HTTP3 (experimental), and WebSocket protocols.
Though thanks to its modularity, it can be easily expanded.
It also has a built-in webserver, which is extremely optimized and has some very nice features that make developing and deploying websites or apps really simple!
NOTE: At this time Akeno only works on Linux. Windows support is not planned yet due to no interest. Note that thanks to the modular nature of Akeno, some features may work on Windows just fine.
Quick installation (on Linux) - requires node, npm, git, gcc, g++, and python (attempts to install automatically if not found)
curl run.lstv.space/install-akeno -s -o /tmp/akeno-setup && sudo bash /tmp/akeno-setup
You can start Akeno with
akeno start
To run under a process manager (recommended):
sudo pm2 start /usr/lib/akeno/app.js --name Akeno
Akeno is focused on speed and efficiency.
The entire server is started and ready in 10ms on average, depending on added modules (making it faster than most modern large servers), and uses uWebSockets (a low-level, incredibly optimized C++ web server) for its HTTP and WebSocket traffic - making it 8.5x faster than the already fast framework Fastify (according to uWS).
Even with a full setup with routing and caching, it is still multiple times faster than even the most minimal express server, out of the box.
On top of that, Akeno automatically handles cache, and adds an ?mtime query parametter for file changes for your static JS/CSS resources with no code changes required, so you dont have to worry about your clients getting outdated content, while still utilizing caching to the fullest.
Akeno can also automatically compresses all of your HTML, CSS and JS code on the fly - saving you the hassle of having to make copies or compress yourself.
Just write the code and watch the magic happen in real time.
Akeno is also faster than popular servers like Nginx for both static and dynamic content.
Akeno is fully modular. On first startup, it only loads what is necesarry. Everything else is loaded as requested, on the fly. This includes API extensions - simply create a JS file with your server-side API in your web app's directory, hot-reload the config and your API is ready to use.
Akeno offers a full-featured command line interface that you can use to control the server on runtime, see stats and manage apps.
- Parser performance increased over 32x 🚀
- Moved the parser to a separate repo and now included as a submodule
- Create a new directory for your app in a directory that is defined in your config.
- In your terminal, go to that directory and run
akeno init website .
- Optionally, edit the newly created app.conf file and add the domains you want to use:
server { domains: *; # Place the domains you want to use } # ...
- Reload akeno (either
akeno reload --hot
orakeno reload
for full reload)
And, done! Your app is now accessible from the domains you have entered, as long as they are pointing to your server's IP. No further configuration needed.
Tired of the repetetive and long HTML templates? How about doing it the Akeno way instead!
Let's say that you want to make a simple site with a title, favicon and a font from Google fonts, and a script:
<head>
@manifest {
title: "This is an example :)";
favicon: /icon.svg;
}
@resources {
fonts: Poppins; # Defaults to Google fonts
js: /main.js;
}
</head>
<body>
Hello world!
</body>
That's it! All the repetetive work is done for you. Akeno even cleans and compresses the code for you (HTML, CSS, and JS).
Also, Akeno will automatically check for local changes and assign a ?mtime
query which, to efficiently keep cache functional while making sure the content is always up-to-date for your users.
Starting with version 1.5, Akeno is compatible with the node --inspect
flag and allows you to debug or test your server with DevTools!
- Open chrome://inspect/ and click "Open dedicated DevTools for Node"
- Start Akeno in dev mode and with the
--inspect
flag (akeno start --inspect
) - Enjoy debugging! The process will be detected and attached automatically. You can directly access the backend (
backend
is a global getter to the backend object).
Exposed properties by default:
- Backend as
backend
- AddonCache as
addons
- API as
api
- resolve as
router
(core HTTP router) - proxyReq as
proxyRouter
(proxy router) - app as
uws
(uWebSockets instance) - SSLApp as
uws_ssl
(only if SSL is enabled) - H3App as
uws_h3
(only if H3 is enabled)
Any other variables are not acessible to the debugger even if global, unless you expose them manually!
From within your addons, scripts or handlers you can use backend.exposeToDebugger(key, value)
to expose an object globally (as a getter to prevent copying - readonly).
This method will silently do nothing if inspect is disabled, so you can call it even in production.