Include directive

nexl hosts JavaScript files. Sometimes you need to reuse them within other files.
You can use include directive to include other files hosted on the same nexl server in the following way:
'@ relative/path/to/the/file.js';
This will include a content of the relative/path/to/the/file.js file at the point you put that command.

Let's say we have a common.js file and we need to include it into the other JavaScript file:
'@ common.js';

threads = 100;

// other stuff...
The '@ common.js'; is a valid JavaScript statement and not causing syntax validation problem.

You can provide relative path only. If the path points out of the storage directory or if you provide absolute path, HTTP request will be rejected.

You can use include directive multiple times for a same file. The first one will be applied, others will be ignored.

Watch a demo