Akeno is a fast and modular, mostly automated Node.JS web (static and dynamic), WebSocket, CDN, and API server which comes as a full-featured suite along with DNS, SSL, DB and user management (all available optionally as addons).
It uses its universal config system to make it easy to manage large quantities of projects or servers all at once.
It has a performance-first webserver, with automated caching, code compression, and a custom HTML parser which allows you to write clean and easier-to-read code, with less maintenance needed.
NOTE: Currently Akeno only works on Linux. Windows support is not planned anytime soon due to the complexity and missing features of the Windows platform and low interest. If you must run this on Windows, wsl is the only way.
Quick installation (Fedora Linux)
Required: node
, npm
, git
curl run.lstv.space/install-akeno -s -o /tmp/akeno-setup && sudo bash /tmp/akeno-setup
To run automatically on startup and enable akeno -i
:
sudo pm2 start /www/content/akeno/app.js --name egapi # If your path differs from the default, replace it.
Akeno excels in top-notch performance.
The entire server is started and ready in 10ms or less on average (making it faster than most modern large servers which can even take minutes), 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).
On top of that, Akeno has smart caching directly to memory, automatic cache header, automatic ?mtime query parametter for file changes, and much more.
Akeno 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 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, manage apps, or interact with its API.
- Create a new directory for your app
(make sure it is included in your main (or imported) config file under
web > locations
- for entries that end with/*
, all sub-directories will be automatically detected, eg. if you make your directory under/www/content/web/
(added by default), you do not need to add an entry to the config each time you make a new app - they will be simply automatically added as long as there is an app.conf file in them) - Create an
app.conf
file and anindex.html
file - Place this basic config:
(Of course, replacing the value with the actual domain names you want your website/app to live on. Wildcards are supported -
server { domains: your.domain.name, ...; }
example.*
,*.example.com
,*.*.example.*
or*-example.com
will all work, including just*
. Additionally, to include an unlimited count of domain levels, use**.example.com
to match botha.example.com
andb.a.example.com
and so on.) - Restart akeno
And, done! Your app is now accessible from the domains you have entered, as long as they are pointing to your server's IP.
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!
<style>
:root {
font-family: Poppins;
}
</style>
</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)! (Including removing the script tag if the file cannot be resolved)
Also - are you tired of your clients not receiving up-to-date resources and dont want to manually bump versions or add ?random
to each resource? Now you don't have to. Akeno will check for changes for local resources automatically and assign a ?mtime
query which contains the last time that the file was changed, to efficiently manage cache while keeping the content always up-to-date!
Starting 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 - 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)
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.