This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
@inexorgame/inexor-flex with all
npm packages installed. Try it out:
@inexorgame/inexor-flex lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Inexor Flex is platform for managing Inexor Core instances and the Inexor Tree API and provides a scripting environment for servers and clients. Inexor Flex also makes multiple user interfaces using web technologies available.
The reference documentation can be found at GitHub pages Further introduction and overview: https://github.com/inexorgame/inexor-core/wiki/Inexor-Flex
Hello there and welcome to the
Now, you're wondering what
inexor-flex actually is, and what it does?
Below is a brief explanation about
tree_. It means that all the settings (variables) in the game can be edited in real-time in a tree structure
inexor-flex. It makes this tree available via a web service (and webviewer). On your local computer.
flex, it also does a bunch of things for you
You can choose from one of our graphical installers at our website.
If you're a little bit more of a techy, here are the command line instructions to install flex
Node.jsinstalled from nodejs.org. The latest stable release is recommended.
yarnpackage manager via
npm i -g yarn
yarn i -g @inexorgame/inexor-flex
inexor-flexdirectly at your fingertips
NOTE: If you're curious what the graphical installer does. No suprise. Exactly the same.
Since nowadays, all configuration is done via
inexor-flex, we have introduced a system called
Each Inexor client or server is an instance. You can have multiple clients (or servers), with different configurations, even running different versions of the game. No problemo.
If you want to be little bit more of a power user, we also ship a graphical interface for flex. Right there. When you download it.
Just go to http://localhost:31416/api/v1/interfaces/ui-flex
And even more fancy. You can see the
inexor tree at http://localhost:31416/api/v1/interfaces/ui-flex/#/instances/31417
To set up
inexor-flex follow the below instructions.
Given that you have cloned
inexor-flex and are in the
yarn install yarn start # start flex
inexor-flex brings a verbose command line that can easily be accessed with it's name.
inexor-flex from your command line (shell, prompt, terminal), and you can have a lot of options to configure
flex from the command line.
Flex is structure in two main folders:
srcis where the utilities of flex reside
serveris where the actual
flex serverresides. The web server is started here, and all run-time functionality (such as paths) are determined here.
All of the above components are wired together using the Application Context module.
After the "wire" individual components, such as the package manager are started.
The API is exposed as a RESTfull API.
inexor-flex was initially born to serve the tree of
inexor-core and this is how it works nowadays.
/instances. e.g for the ReleaseManager, the namespace is
Interfaces are graphical user interfaces for
Below is a list of the default interfaces shipped with
NOTE: For the
ui modules also uses
An interface should follow the below directory structure:
distfolder with all it's assets
You can then use the
interfaces command line to add your newly written.
We use JSDoc for documentation. All modules from
server are automatically added to the documentation, when following the standards.
We endorse the
eslint:recommended rule set, combined with some custom rules.
You can make sure your module matches our standard by running
npm run lint in the main directory.
When writting a module, please keep the following in mind
*_test.js, though it is highly recommended to add a
testfolder to your module
README.mdto the respective module
We also try to apply the changes detected by the [
The REST API (
v1) is wired together in
Documentation via swagger should follow soon enough.
Essentially to write your very first own module, you should go like this
cd src/YOURMODULE & npm initwhich will ask you a bunch of questions
index.jsfile with it's functionality
Now you can use
npm link inside the directory. Later on your module can be used via
const yourmodule = require('@inexorgame/yourmodule')
You can have a look at the
src/types module, for a very simple and basic module example.
We have specifically designed the module
@inexorgame/treeclient to work with the
You can have a look at one of the many command-line tasks in
server/commands/cli/ which will give a fine example on how to use the
flex won't start for strange reasons the most likely thing is that you've worked with a earlier revision in which an individual module is broken.
Try the following:
npm unlink @inexorgame && npm un -g @inexorgame/inexor-flex
rm -rf node_modules
And then install again.
This is either to-do or nice to have