Finally, the new version of Total.js framework is here! This new version brings great new features, updates and some bugfixes. We recommend to update your older version of Total.js framework!
$ npm install total.js
This is really a great new feature, because you can merge files directly in the view engine via @{import()}
method like this:
We have added a new sub-type into the configuration called generate
. This sub-type generates a random value and stores it for future restarts. For example: the code below will generate 10 characters string with chars/numbers:
Total.js Cluster got really good and very helpful improvements.
Auto-scalability:
Main thread watches all threads in 5 seconds interval and if child processes respond in more than 70 ms then the main thread will open a new child process. If child processes aren't fully utilized then child processes will be killed automatically.
Debug Mode in Cluster:
Finally, you can use debug mode in cluster mode too. The framework restarts threads automatically if some server-side script is changed.
Server-less architecture:
(currently beta) We have prepared our architecture of server-less in Total.js framework and currently we prepare a cloud environment for it. We called it: THREADS. Our architecture offers total brutal performance with help of auto-scalability cluster for each thread.
It's not easy to provide THREADS, but you can learn from example: Threads example.
We have added a simple extandable machanism for extending operations in the schemas. Extensions are available in all schema operations.
Example:
This version supports a new method called UPDATE()
. This method will run scripts from /updates/
directory according to the version. It's much simple alternative to startup
scripts, because update scripts are evaluated in the main thread and after all dependencies are loaded.
/updates/1.0.0.js
/updates/1.0.0.js_bk
Ipv4
address in the console outputbase64
HttpFile
contains finally .extension
property.reset()
method.mjs
extensions.env
parser, now it can parse .env-debug
or .env-release
according to the modeallow_reqlimit : Number
controller.success()
Good to know: GZIP compression is enabled only for plain-text (HTML, JSON, etc.) bodies which have more than 4096 bytes.
This version fixes some bugs. Again we have had a problem with traversal vulnerability - fixed.
We have found a big problem with UID generator in Total.js v3, validations won't work in 2021. Yeah, this is big problem and this new version solves it. Don't worry about old UIDs, they are valid. But a big problem will be with a new UIDs in 2021. Just update your older version and everything will be fine.