<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.fulljs.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guttmann</id>
	<title>FullJS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.fulljs.eu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Guttmann"/>
	<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php/Special:Contributions/Guttmann"/>
	<updated>2026-07-09T08:27:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=157</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=157"/>
		<updated>2025-09-22T05:38:05Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Request and Response Handling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@enable&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import { Server, enable }         		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationServer }			from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HttpServer, http }       		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { AuthenticationService, auth }	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { PermissionManager, perm }      from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { SystemdIntegration }         	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HAProxyIntegration }	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationConsole }    		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@enable( ApplicationConsole )&lt;br /&gt;
@enable( HAProxyIntegration, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@enable( SystemdIntegration )&lt;br /&gt;
@enable( HttpServer, {port: 8080} )&lt;br /&gt;
@enable( ApplicationServer )&lt;br /&gt;
@enable( AuthenticationService )&lt;br /&gt;
@enable( PermissionManager )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@enable&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
The path may be a string for an exact match or a RegExp for flexible matching.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
Once a request is routed, the method must return a new &amp;lt;code&amp;gt;Response&amp;lt;/code&amp;gt; object so that the server can properly send the HTTP response back to the client.&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import { Server, enable }         		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationServer }			from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HttpServer, http }       		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { AuthenticationService, auth }	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { PermissionManager, perm }      from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { SystemdIntegration }         	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HAProxyIntegration }	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationConsole }    		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@enable( ApplicationConsole )&lt;br /&gt;
@enable( HAProxyIntegration, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@enable( SystemdIntegration )&lt;br /&gt;
@enable( HttpServer, {port: 8080} )&lt;br /&gt;
@enable( ApplicationServer )&lt;br /&gt;
@enable( AuthenticationService )&lt;br /&gt;
@enable( PermissionManager )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=156</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=156"/>
		<updated>2025-09-22T05:37:29Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@enable&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import { Server, enable }         		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationServer }			from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HttpServer, http }       		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { AuthenticationService, auth }	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { PermissionManager, perm }      from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { SystemdIntegration }         	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HAProxyIntegration }	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationConsole }    		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@enable( ApplicationConsole )&lt;br /&gt;
@enable( HAProxyIntegration, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@enable( SystemdIntegration )&lt;br /&gt;
@enable( HttpServer, {port: 8080} )&lt;br /&gt;
@enable( ApplicationServer )&lt;br /&gt;
@enable( AuthenticationService )&lt;br /&gt;
@enable( PermissionManager )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@enable&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
The path may be a string for an exact match or a RegExp for flexible matching.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
Once a request is routed, the method must return a new &amp;lt;code&amp;gt;Response&amp;lt;/code&amp;gt; object so that the server can properly send the HTTP response back to the client.&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=155</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=155"/>
		<updated>2025-09-22T05:37:10Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@enable&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import { Server, enable }         		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationServer }			from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HttpServer, http }       		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { AuthenticationService, auth }	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { PermissionManager, perm }      from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { SystemdIntegration }         	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { HAProxyIntegration }	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import { ApplicationConsole }    		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@enable( ApplicationConsole )&lt;br /&gt;
@enable( HAProxyIntegration, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@enable( SystemdIntegration )&lt;br /&gt;
@enable( HttpServer, {port: 8080} )&lt;br /&gt;
@enable( ApplicationServer )&lt;br /&gt;
@enable( AuthenticationService )&lt;br /&gt;
@enable( PermissionManager )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
The path may be a string for an exact match or a RegExp for flexible matching.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
Once a request is routed, the method must return a new &amp;lt;code&amp;gt;Response&amp;lt;/code&amp;gt; object so that the server can properly send the HTTP response back to the client.&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=154</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=154"/>
		<updated>2025-09-19T16:36:07Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Supported Decorators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
The path may be a string for an exact match or a RegExp for flexible matching.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
Once a request is routed, the method must return a new &amp;lt;code&amp;gt;Response&amp;lt;/code&amp;gt; object so that the server can properly send the HTTP response back to the client.&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=153</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=153"/>
		<updated>2025-09-19T16:30:26Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
Once a request is routed, the method must return a new &amp;lt;code&amp;gt;Response&amp;lt;/code&amp;gt; object so that the server can properly send the HTTP response back to the client.&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=152</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=152"/>
		<updated>2025-09-19T16:24:52Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
  async handleRequest(request) {&lt;br /&gt;
      return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
          status: 200,&lt;br /&gt;
          headers: {&lt;br /&gt;
              &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
          }&lt;br /&gt;
      });&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=151</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=151"/>
		<updated>2025-09-19T16:19:54Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/[application]/[microservice]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/[application]/[microservice]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/[application]/[microservice]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/[application]/[microservice]/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered using the &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator, which associates a plugin class with optional configuration options.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: The static initialization ensures the server is instantiated immediately upon class definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server, use}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}		from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin, auth}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin, perm}       from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HAProxyPlugin}	    	from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@use( DebugConsolePlugin )&lt;br /&gt;
@use( HAProxyPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;} )&lt;br /&gt;
@use( SystemdPlugin )&lt;br /&gt;
@use( HttpPlugin, {port: 8080} )&lt;br /&gt;
@use( AppServerPlugin )&lt;br /&gt;
@use( AuthPlugin )&lt;br /&gt;
@use( PermPlugin )&lt;br /&gt;
class MyServer extends Server {&lt;br /&gt;
  &lt;br /&gt;
  static {           &lt;br /&gt;
    new this();&lt;br /&gt;
  }  &lt;br /&gt;
&lt;br /&gt;
  constructor(...args) {&lt;br /&gt;
    super(...args);    &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
# The &amp;lt;code&amp;gt;@use&amp;lt;/code&amp;gt; decorator can be applied multiple times to register different plugins.&lt;br /&gt;
# Plugin options can configure ports, endpoints, or internal slots for routing.&lt;br /&gt;
&lt;br /&gt;
= HttpPlugin =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; extends the core &#039;&#039;&#039;Server&#039;&#039;&#039; class with HTTP capabilities.  &lt;br /&gt;
When this plugin is enabled, the server can listen on a given port and expose REST-like endpoints.  &lt;br /&gt;
&lt;br /&gt;
This makes it possible to build fully functional web APIs directly on top of the server, using standard &#039;&#039;&#039;Request&#039;&#039;&#039; and &#039;&#039;&#039;Response&#039;&#039;&#039; handling from the Web API specification.&lt;br /&gt;
&lt;br /&gt;
== Decorator-Based Routing ==&lt;br /&gt;
Once the &#039;&#039;&#039;HttpPlugin&#039;&#039;&#039; is enabled, endpoints can be defined directly in the server class using decorators.  &lt;br /&gt;
Each decorator corresponds to a specific HTTP method.&lt;br /&gt;
&lt;br /&gt;
=== Supported Decorators ===&lt;br /&gt;
* &#039;&#039;&#039;@http.get(path)&#039;&#039;&#039; – Declares a GET endpoint for the given path. Used for fetching resources or data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.post(path)&#039;&#039;&#039; – Declares a POST endpoint for the given path. Used for creating new resources or submitting data.  &lt;br /&gt;
* &#039;&#039;&#039;@http.put(path)&#039;&#039;&#039; – Declares a PUT endpoint for the given path. Used for updating or replacing an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.patch(path)&#039;&#039;&#039; – Declares a PATCH endpoint for the given path. Used for partially updating an existing resource.  &lt;br /&gt;
* &#039;&#039;&#039;@http.delete(path)&#039;&#039;&#039; – Declares a DELETE endpoint for the given path. Used for removing resources.  &lt;br /&gt;
* &#039;&#039;&#039;@http.head(path)&#039;&#039;&#039; – Declares a HEAD endpoint for the given path. Similar to GET but returns only headers without the body.  &lt;br /&gt;
* &#039;&#039;&#039;@http.options(path)&#039;&#039;&#039; – Declares an OPTIONS endpoint for the given path. Used for describing communication options, often in CORS scenarios.&lt;br /&gt;
&lt;br /&gt;
== Request and Response Handling ==&lt;br /&gt;
The plugin uses standard Web API classes:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Request&#039;&#039;&#039; – represents the incoming HTTP request (method, URL, headers, body).  &lt;br /&gt;
* &#039;&#039;&#039;Response&#039;&#039;&#039; – represents the outgoing HTTP response (status, headers, body).  &lt;br /&gt;
&lt;br /&gt;
This ensures full compatibility with modern JavaScript patterns for handling HTTP.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import {Server}            from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin, http}  from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {Response}          from &amp;quot;fetch&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, { port: 8080 });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
        &lt;br /&gt;
        this.start();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    @http.get(&amp;quot;/myendpoint&amp;quot;)&lt;br /&gt;
    async handleRequest(request) {&lt;br /&gt;
        return new Response(&amp;quot;Hello world&amp;quot;, {&lt;br /&gt;
            status: 200,&lt;br /&gt;
            headers: {&lt;br /&gt;
                &amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=137</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=137"/>
		<updated>2025-09-02T07:28:08Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
Note: This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=136</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=136"/>
		<updated>2025-09-02T07:25:01Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warn|This documentation is not final and may be updated as the architecture evolves.}} &lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=135</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=135"/>
		<updated>2025-09-02T07:24:54Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
{{Welcome}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warn|This documentation is not final and may be updated as the architecture evolves.}} &lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=134</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=134"/>
		<updated>2025-09-02T07:23:34Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warn|This documentation is not final and may be updated as the architecture evolves.}} &lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=133</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=133"/>
		<updated>2025-09-02T07:23:21Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warn}} This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=132</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=132"/>
		<updated>2025-09-02T07:20:00Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warning}} This documentation is not final and may be updated as the architecture evolves.&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=131</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=131"/>
		<updated>2025-09-02T07:18:54Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warning|This documentation is not final and may be updated as the architecture evolves.}}&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=130</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=130"/>
		<updated>2025-09-02T07:11:51Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Warn|This documentation is not final and may be updated as the architecture evolves.}}&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=129</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=129"/>
		<updated>2025-09-02T07:09:39Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Note|type=warn|text=This documentation is not final and may be updated as the architecture evolves.}}&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=128</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=128"/>
		<updated>2025-09-02T07:07:01Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
{{Note|This documentation is not final and may be updated as the architecture evolves.}}&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=127</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=127"/>
		<updated>2025-09-02T07:03:59Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=126</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=126"/>
		<updated>2025-09-02T07:02:16Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=125</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=125"/>
		<updated>2025-09-02T07:00:38Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server and other modules to be extended and customized by dynamically enabling plugins. Each plugin is a self-contained module and encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core module logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=124</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=124"/>
		<updated>2025-09-02T06:55:53Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=123</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=123"/>
		<updated>2025-09-02T06:55:11Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Filesystem Layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=122</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=122"/>
		<updated>2025-09-02T06:54:36Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=121</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=121"/>
		<updated>2025-09-02T06:02:21Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=120</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=120"/>
		<updated>2025-09-02T06:00:45Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=119</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=119"/>
		<updated>2025-09-02T05:57:01Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javacript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=118</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=118"/>
		<updated>2025-09-02T05:56:30Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javacript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=117</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=117"/>
		<updated>2025-09-02T05:51:01Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javacript&amp;quot;&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=116</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=116"/>
		<updated>2025-09-01T21:20:08Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        MyServer.enablePlugin(SystemdPlugin);&lt;br /&gt;
        MyServer.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        MyServer.enablePlugin(AppServerPlugin);&lt;br /&gt;
        MyServer.enablePlugin(AuthPlugin);&lt;br /&gt;
        MyServer.enablePlugin(PermPlugin);&lt;br /&gt;
        MyServer.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=115</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=115"/>
		<updated>2025-09-01T21:17:50Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the application server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, systemd integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main &#039;&#039;Server&#039;&#039; class provides the infrastructure for running the application and managing plugins.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins. This ensures that the server is fully configured before any instances are created (mostly one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        this.enablePlugin(SystemdPlugin);&lt;br /&gt;
        this.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        this.enablePlugin(AppServerPlugin);&lt;br /&gt;
        this.enablePlugin(AuthPlugin);&lt;br /&gt;
        this.enablePlugin(PermPlugin);&lt;br /&gt;
        this.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=114</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=114"/>
		<updated>2025-09-01T21:13:29Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the backend server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, system integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main server class provides the infrastructure for running the application and managing plugins. For example, &amp;lt;code&amp;gt;Server&amp;lt;/code&amp;gt; in the code acts as the base class.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins at startup. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        this.enablePlugin(SystemdPlugin);&lt;br /&gt;
        this.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        this.enablePlugin(AppServerPlugin);&lt;br /&gt;
        this.enablePlugin(AuthPlugin);&lt;br /&gt;
        this.enablePlugin(PermPlugin);&lt;br /&gt;
        this.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=113</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=113"/>
		<updated>2025-09-01T21:12:31Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the backend server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, system integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main server class provides the infrastructure for running the application and managing plugins. For example, &amp;lt;code&amp;gt;Server&amp;lt;/code&amp;gt; in the code acts as the base class.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins at startup. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        this.enablePlugin(SystemdPlugin);&lt;br /&gt;
        this.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        this.enablePlugin(AppServerPlugin);&lt;br /&gt;
        this.enablePlugin(AuthPlugin);&lt;br /&gt;
        this.enablePlugin(PermPlugin);&lt;br /&gt;
        this.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=112</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=112"/>
		<updated>2025-09-01T21:11:38Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;br /&gt;
&lt;br /&gt;
= Plugin-based architecture – Extend and customize backend functionality through a modular plugin system =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Description:&#039;&#039;&#039;&lt;br /&gt;
The plugin-based architecture allows the backend server to be extended and customized by dynamically enabling modular plugins. Each plugin encapsulates a specific functionality, such as HTTP handling, authentication, permission management, system integration, or debugging tools. This design decouples core server logic from optional features, making it easier to maintain, test, and evolve the system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;How it works:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Core Server Class&#039;&#039;&#039;: The main server class provides the infrastructure for running the application and managing plugins. For example, &amp;lt;code&amp;gt;Server&amp;lt;/code&amp;gt; in the code acts as the base class.&lt;br /&gt;
# &#039;&#039;&#039;Plugin Registration&#039;&#039;&#039;: Plugins are registered via a static method, e.g., &amp;lt;code&amp;gt;enablePlugin(pluginClass, options)&amp;lt;/code&amp;gt;. This allows the server to load specific functionality only when needed.&lt;br /&gt;
# &#039;&#039;&#039;Static Initialization&#039;&#039;&#039;: A &#039;&#039;&#039;static block&#039;&#039;&#039; in the server class runs once when the class is defined. It is used to register all required plugins at startup. This ensures that the server is fully configured before any instances are created.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
/* @babel ES2025 */&lt;br /&gt;
&lt;br /&gt;
import Plugin                   from &amp;quot;plugin&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
import {Server}                 from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AppServerPlugin}        from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {SystemdPlugin}          from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {HttpPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {AuthPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {PermPlugin}             from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
import {DebugConsolePlugin}     from &amp;quot;appserver&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
new (class MyServer extends Server {&lt;br /&gt;
&lt;br /&gt;
    static {&lt;br /&gt;
        this.enablePlugin(SystemdPlugin);&lt;br /&gt;
        this.enablePlugin(HttpPlugin, {port: 8080, endpoint: /^(?!.*\.jss$).*/, slot: &amp;quot;http_slot00&amp;quot;});&lt;br /&gt;
        this.enablePlugin(AppServerPlugin);&lt;br /&gt;
        this.enablePlugin(AuthPlugin);&lt;br /&gt;
        this.enablePlugin(PermPlugin);&lt;br /&gt;
        this.enablePlugin(DebugConsolePlugin);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    constructor(...args) {&lt;br /&gt;
        super(...args);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Plugin Isolation and Modularity&#039;&#039;&#039;: Each plugin is a self-contained module, responsible for a particular aspect of server functionality. The server core interacts with plugins through a defined interface, enabling safe modularity and easy swapping or upgrading of features.&lt;br /&gt;
# &#039;&#039;&#039;Extensibility&#039;&#039;&#039;: Developers can create new plugins without modifying the core server code. By simply calling &amp;lt;code&amp;gt;enablePlugin(NewPlugin)&amp;lt;/code&amp;gt; in the static block, the new functionality is integrated seamlessly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Benefits:&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Modular Design&#039;&#039;&#039;: Features can be added or removed without touching the core logic.&lt;br /&gt;
* &#039;&#039;&#039;Reusability&#039;&#039;&#039;: Plugins can be shared between different projects or server instances.&lt;br /&gt;
* &#039;&#039;&#039;Scalability&#039;&#039;&#039;: Additional functionality can be loaded dynamically as the application grows.&lt;br /&gt;
* &#039;&#039;&#039;Maintainability&#039;&#039;&#039;: Bugs or updates in one plugin do not affect other parts of the system.&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Introduction&amp;diff=111</id>
		<title>Introduction</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Introduction&amp;diff=111"/>
		<updated>2025-09-01T15:42:36Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Backend */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;FullJS&#039;&#039;&#039; is a complete ecosystem for developing and running applications with JavaScript. It brings together an embedded V8 runtime, a robust server-side application server with full Linux and systemd integration, a KDE Plasma-like frontend GUI library, a set of built-in libraries for common development tasks, and a powerful web-based IDE featuring drag-and-drop GUI design.&lt;br /&gt;
&lt;br /&gt;
= JavaScript Runtime =&lt;br /&gt;
The runtime is built on the V8 JavaScript engine, designed exclusively for Linux delivering maximum performance, stability, and reliability across a wide range of architectures.&lt;br /&gt;
&lt;br /&gt;
= Application Server =&lt;br /&gt;
The application server provides a robust, modular, and secure foundation for running server-side services.  &lt;br /&gt;
It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilities.&lt;br /&gt;
&lt;br /&gt;
Key features include:&lt;br /&gt;
* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system.  &lt;br /&gt;
* Microservice-oriented design – Services are isolated and loosely coupled, making them scalable and maintainable.  &lt;br /&gt;
* Advanced logging – Structured logging with runtime-configurable log levels.  &lt;br /&gt;
* JWT-based authentication – Secure, standard-compliant authentication mechanism for microservices.  &lt;br /&gt;
* Built-in user management – Centralized user handling for authentication.  &lt;br /&gt;
* ABAC (Attribute-Based Access Control) – Fine-grained permission management based on user attributes and policies.  &lt;br /&gt;
* Full systemd integration – Each microservice can be managed natively as systemd services (start, stop, reload, status).  &lt;br /&gt;
* Complete D-Bus integration – Native inter-process communication support for Linux server environments.&lt;br /&gt;
&lt;br /&gt;
= Frontend =&lt;br /&gt;
The FullJS frontend is built for **complex, information-driven web applications** rather than content-oriented websites.  &lt;br /&gt;
&lt;br /&gt;
Key features include:&lt;br /&gt;
* KDE Plasma-inspired look &amp;amp; feel – A modern, desktop-like experience within the browser, including both light and dark color schemes.  &lt;br /&gt;
* Plugin-based design – Extend the frontend with additional components and modules.  &lt;br /&gt;
* Core GUI controls – Buttons, icons, dialogs, and essential widgets for building application interfaces.  &lt;br /&gt;
* Integrated third-party libraries – Support for advanced tools such as Chart.js for charts and Leaflet for maps and geospatial visualization.&lt;br /&gt;
&lt;br /&gt;
= Built-In Libraries =&lt;br /&gt;
FullJS includes a set of built-in JavaScript and native libraries to simplify common development tasks.  &lt;br /&gt;
Examples of core libraries include:&lt;br /&gt;
* File system access (`fs`) – Fully asynchronous I/O powered by Linux `io_uring` for high-performance file operations.  &lt;br /&gt;
* Thread management (`Worker`) – Manage concurrent tasks efficiently.  &lt;br /&gt;
* Networking (`Socket`, `http`) – Build robust server and client network applications.  &lt;br /&gt;
* GUI elements for web-based apps – Buttons, icons, dialogs, and other essential widgets.  &lt;br /&gt;
* Charts and data visualization (`ChartJS`) – Visualize data directly in your application.  &lt;br /&gt;
* Logging utilities (`console`) – Structured logging with configurable log levels for easy debugging and monitoring.  &lt;br /&gt;
&lt;br /&gt;
These libraries allow developers to build complex applications with minimal effort, while taking full advantage of FullJS&#039;s high-performance runtime and system integration.&lt;br /&gt;
&lt;br /&gt;
= Web IDE =&lt;br /&gt;
A web-based Integrated Development Environment (IDE) for creating and managing applications.  &lt;br /&gt;
It enables development of both &#039;&#039;&#039;client-side&#039;&#039;&#039; and &#039;&#039;&#039;server-side&#039;&#039;&#039; code.  &lt;br /&gt;
While the backend requires Linux, client-side applications run in any modern browser (e.g., Google Chrome), making your apps accessible to everyone.&lt;br /&gt;
&lt;br /&gt;
= Get Started =&lt;br /&gt;
To begin using FullJS, explore the following pages:&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Architecture]]&lt;br /&gt;
* [[Libraries]]&lt;br /&gt;
* [[Tutorials]]&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Introduction&amp;diff=110</id>
		<title>Introduction</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Introduction&amp;diff=110"/>
		<updated>2025-09-01T15:42:02Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Runtime */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;FullJS&#039;&#039;&#039; is a complete ecosystem for developing and running applications with JavaScript. It brings together an embedded V8 runtime, a robust server-side application server with full Linux and systemd integration, a KDE Plasma-like frontend GUI library, a set of built-in libraries for common development tasks, and a powerful web-based IDE featuring drag-and-drop GUI design.&lt;br /&gt;
&lt;br /&gt;
= JavaScript Runtime =&lt;br /&gt;
The runtime is built on the V8 JavaScript engine, designed exclusively for Linux delivering maximum performance, stability, and reliability across a wide range of architectures.&lt;br /&gt;
&lt;br /&gt;
= Backend =&lt;br /&gt;
The FullJS backend provides a robust, modular, and secure foundation for running server-side services.  &lt;br /&gt;
It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilities.&lt;br /&gt;
&lt;br /&gt;
Key features include:&lt;br /&gt;
* Plugin-based architecture – Extend and customize backend functionality through a modular plugin system.  &lt;br /&gt;
* Microservice-oriented design – Services are isolated and loosely coupled, making them scalable and maintainable.  &lt;br /&gt;
* Advanced logging – Structured logging with runtime-configurable log levels.  &lt;br /&gt;
* JWT-based authentication – Secure, standard-compliant authentication mechanism for microservices.  &lt;br /&gt;
* Built-in user management – Centralized user handling for authentication.  &lt;br /&gt;
* ABAC (Attribute-Based Access Control) – Fine-grained permission management based on user attributes and policies.  &lt;br /&gt;
* Full systemd integration – Each microservice can be managed natively as systemd services (start, stop, reload, status).  &lt;br /&gt;
* Complete D-Bus integration – Native inter-process communication support for Linux server environments.&lt;br /&gt;
&lt;br /&gt;
= Frontend =&lt;br /&gt;
The FullJS frontend is built for **complex, information-driven web applications** rather than content-oriented websites.  &lt;br /&gt;
&lt;br /&gt;
Key features include:&lt;br /&gt;
* KDE Plasma-inspired look &amp;amp; feel – A modern, desktop-like experience within the browser, including both light and dark color schemes.  &lt;br /&gt;
* Plugin-based design – Extend the frontend with additional components and modules.  &lt;br /&gt;
* Core GUI controls – Buttons, icons, dialogs, and essential widgets for building application interfaces.  &lt;br /&gt;
* Integrated third-party libraries – Support for advanced tools such as Chart.js for charts and Leaflet for maps and geospatial visualization.&lt;br /&gt;
&lt;br /&gt;
= Built-In Libraries =&lt;br /&gt;
FullJS includes a set of built-in JavaScript and native libraries to simplify common development tasks.  &lt;br /&gt;
Examples of core libraries include:&lt;br /&gt;
* File system access (`fs`) – Fully asynchronous I/O powered by Linux `io_uring` for high-performance file operations.  &lt;br /&gt;
* Thread management (`Worker`) – Manage concurrent tasks efficiently.  &lt;br /&gt;
* Networking (`Socket`, `http`) – Build robust server and client network applications.  &lt;br /&gt;
* GUI elements for web-based apps – Buttons, icons, dialogs, and other essential widgets.  &lt;br /&gt;
* Charts and data visualization (`ChartJS`) – Visualize data directly in your application.  &lt;br /&gt;
* Logging utilities (`console`) – Structured logging with configurable log levels for easy debugging and monitoring.  &lt;br /&gt;
&lt;br /&gt;
These libraries allow developers to build complex applications with minimal effort, while taking full advantage of FullJS&#039;s high-performance runtime and system integration.&lt;br /&gt;
&lt;br /&gt;
= Web IDE =&lt;br /&gt;
A web-based Integrated Development Environment (IDE) for creating and managing applications.  &lt;br /&gt;
It enables development of both &#039;&#039;&#039;client-side&#039;&#039;&#039; and &#039;&#039;&#039;server-side&#039;&#039;&#039; code.  &lt;br /&gt;
While the backend requires Linux, client-side applications run in any modern browser (e.g., Google Chrome), making your apps accessible to everyone.&lt;br /&gt;
&lt;br /&gt;
= Get Started =&lt;br /&gt;
To begin using FullJS, explore the following pages:&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Architecture]]&lt;br /&gt;
* [[Libraries]]&lt;br /&gt;
* [[Tutorials]]&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application-server&amp;diff=109</id>
		<title>Application-server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application-server&amp;diff=109"/>
		<updated>2025-09-01T15:39:00Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Application-server to Application Server over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Application Server]]&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=108</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=108"/>
		<updated>2025-09-01T15:39:00Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Application-server to Application Server over redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=106</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=106"/>
		<updated>2025-09-01T15:37:47Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Application Server to Application-server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=105</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=105"/>
		<updated>2025-09-01T15:34:41Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** JavaScript_Runtime|JavaScript Runtime&lt;br /&gt;
** Application_Server|Application Server&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Backend&amp;diff=104</id>
		<title>Backend</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Backend&amp;diff=104"/>
		<updated>2025-09-01T15:33:45Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Backend to Application Server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Application Server]]&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=103</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=103"/>
		<updated>2025-09-01T15:33:45Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Backend to Application Server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=102</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=102"/>
		<updated>2025-09-01T15:33:05Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** JavaScript_Runtime|JavaScript Runtime&lt;br /&gt;
** backend|Backend&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=101</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=101"/>
		<updated>2025-09-01T15:32:41Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** JavaScript_Runtime|JavaScript_Runtime&lt;br /&gt;
** backend|Backend&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=100</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=100"/>
		<updated>2025-09-01T15:31:24Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** javascript_runtime|JavaScript_Runtime&lt;br /&gt;
** backend|Backend&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=99</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=99"/>
		<updated>2025-09-01T15:30:28Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** javascript_runtime|JavaScript Runtime&lt;br /&gt;
** backend|Backend&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Runtime&amp;diff=98</id>
		<title>Runtime</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Runtime&amp;diff=98"/>
		<updated>2025-09-01T15:29:41Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Runtime to JavaScript Runtime&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[JavaScript Runtime]]&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=JavaScript_Runtime&amp;diff=97</id>
		<title>JavaScript Runtime</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=JavaScript_Runtime&amp;diff=97"/>
		<updated>2025-09-01T15:29:41Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: Guttmann moved page Runtime to JavaScript Runtime&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Built on the V8 JavaScript engine, using a single-threaded event loop with non-blocking I/O for main execution, and supporting optional Worker threads for parallel tasks.&lt;br /&gt;
&lt;br /&gt;
= Supported operating systems =&lt;br /&gt;
FullJS is designed to run exclusively on Linux-based systems.  &lt;br /&gt;
* &#039;&#039;&#039;Debian&#039;&#039;&#039; 12 or newer  &lt;br /&gt;
* &#039;&#039;&#039;Ubuntu&#039;&#039;&#039; (and other Debian-based derivatives)  &lt;br /&gt;
&lt;br /&gt;
A working &#039;&#039;&#039;systemd&#039;&#039;&#039; installation is required, as the runtime integrates with systemd for service management.&lt;br /&gt;
&lt;br /&gt;
= Supported architectures =&lt;br /&gt;
* amd64&lt;br /&gt;
* arm64&lt;br /&gt;
* riscv64&lt;br /&gt;
* arm&lt;br /&gt;
&lt;br /&gt;
= Event System =&lt;br /&gt;
* Uses &#039;&#039;&#039;epoll&#039;&#039;&#039; as the backend event notification facility for scalable, high-performance I/O.  &lt;br /&gt;
* Optimized for large numbers of concurrent I/O operation.  &lt;br /&gt;
&lt;br /&gt;
= Module System =&lt;br /&gt;
* Supports only ES6 import/export syntax.  &lt;br /&gt;
* Supports .js modules and native .so modules&lt;br /&gt;
&lt;br /&gt;
= Global Scope =&lt;br /&gt;
Default global scope mimics a Web API-like environment but only relevant server-side features are exposed:&lt;br /&gt;
* Events (Event, EventTarget, CustomEvent)  &lt;br /&gt;
* Timers (setTimeout, setInterval, etc.)  &lt;br /&gt;
* Console (Console, console.log, console.error) &lt;br /&gt;
* Base64 utilities (atob, btoa)  &lt;br /&gt;
* Encoding (TextEncoder, TextDecoder)  &lt;br /&gt;
* Storage API (Storage, localStorage, sessionStorage)  &lt;br /&gt;
* URL API (URL, URLSearchParams)  &lt;br /&gt;
* Fetch API (fetch, Response, Request)  &lt;br /&gt;
* Web Crypto API (crypto.getRandomValues, subtle.digest)  &lt;br /&gt;
* Streams API (ReadableStream, WritableStream, TransformStream)  &lt;br /&gt;
* Web Workers (Worker)  &lt;br /&gt;
* Performance (performance.now)  &lt;br /&gt;
* AbortController, AbortSignal&lt;br /&gt;
* DOMException&lt;br /&gt;
&lt;br /&gt;
= Directory Structure =&lt;br /&gt;
FullJS follows the Linux Filesystem Hierarchy Standard (FHS) with specific locations for binaries, libraries, modules, and JavaScript files:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;/usr/bin/&#039;&#039;&#039; – FullJS JavaScript binary (js), V8 snapshot (snapshot_blob.bin), and ICU data file (icudtl.dat)  &lt;br /&gt;
* &#039;&#039;&#039;/usr/lib/fulljs/&#039;&#039;&#039; – V8 shared libraries (e.g., libv8.so)  &lt;br /&gt;
* &#039;&#039;&#039;/usr/lib/fulljs_modules/&#039;&#039;&#039; – Dynamically loadable native .so C++ modules (e.g., fs, process, v4l2, etc.)   &lt;br /&gt;
* &#039;&#039;&#039;/usr/lib/fulljs_scope/&#039;&#039;&#039; – JavaScript file defining the default scope (e.g. globalscope.js, workerglobalscope.js)  &lt;br /&gt;
* &#039;&#039;&#039;/usr/share/javascript/fulljs/&#039;&#039;&#039; – Dynamically loadable .js JavaScript modules (e.g., path, Dialog, etc.)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=96</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=MediaWiki:Sidebar&amp;diff=96"/>
		<updated>2025-09-01T15:26:25Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** introduction|Introduction&lt;br /&gt;
** runtime|Runtime&lt;br /&gt;
** backend|Backend&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=95</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=95"/>
		<updated>2025-09-01T15:22:29Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
	<entry>
		<id>https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=94</id>
		<title>Application Server</title>
		<link rel="alternate" type="text/html" href="https://docs.fulljs.eu/index.php?title=Application_Server&amp;diff=94"/>
		<updated>2025-09-01T15:21:35Z</updated>

		<summary type="html">&lt;p&gt;Guttmann: /* Filesystem Layout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The FullJS application server provides a robust, modular, and secure foundation for running server-side services. It combines modern architectural principles with deep Linux integration to deliver enterprise-grade capabilitie&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Microservice Architecture =&lt;br /&gt;
The FullJS applications server follows a microservice-based server architecture with deep systemd integration. The application server is represented as a Systemd target ([application].target), with each individual microservice corresponding to a systemd unit instance ([application]@[microservice]).&lt;br /&gt;
&lt;br /&gt;
== Adding and Removing Microservices from the Application Server ==&lt;br /&gt;
&lt;br /&gt;
To add a microservice (a.k.a systemd unit instance) to the application server (a.k.a systemd target):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl enable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To remove a microservice from the application server group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl disable [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; Enabling a microservice only registers it with the application server for automatic start at boot. It does **not** start the microservice immediately in the current session.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a Microservice ==  &lt;br /&gt;
Each microservice runs as a separate systemd unit instance ([application]@[microservice]).  &lt;br /&gt;
To start a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a microservice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; starting a microservice only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Checking the Status of a Microservice ==&lt;br /&gt;
Each microservice runs as a separate systemd unit instance (&amp;lt;code&amp;gt;[application]@[microservice]&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
* To check the current status of a microservice instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl status [application]@[microservice]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command shows whether the service is running, stopped, or failed, along with recent log entries.&lt;br /&gt;
&lt;br /&gt;
== Starting and Stopping a the application server ==&lt;br /&gt;
To start the application server use systemd’s start command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl start [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop a running application server, you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo systemctl stop [application].target&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that starting an application server only affects the current session and does not configure it to start automatically at boot.&lt;br /&gt;
&lt;br /&gt;
== Enabling and Disabling a the application server ==&lt;br /&gt;
To start the application server automatically at boot, you must enable it.&lt;br /&gt;
&lt;br /&gt;
To start the application server at boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl enable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To disable the application service from starting automatically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl disable [application].target&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keep in mind that enabling an application server does not start it in the current session.&lt;br /&gt;
&lt;br /&gt;
= Filesystem Layout =&lt;br /&gt;
The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;/srv/fulljs/[instance]/&amp;lt;/code&amp;gt; – contains the deployed application&lt;br /&gt;
* &amp;lt;code&amp;gt;/run/fulljs/[instance]/**&amp;lt;/code&amp;gt; – runtime files (e.g., sockets, PID files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/var/lib/fulljs/[instance]/**&amp;lt;/code&amp;gt; – persistent state data (e.g., storage files)&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/fulljs/**&amp;lt;/code&amp;gt; – configuration files (if any)&lt;/div&gt;</summary>
		<author><name>Guttmann</name></author>
	</entry>
</feed>