Application Server

From FullJS
Revision as of 08:51, 31 August 2025 by Guttmann (talk | contribs) (Created page with "The FullJS backend 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 = Microservice Architecture = FullJS applications follows a microservice-based server architecture with deep systemd integration. Each individual microservice corresponds to a systemd unit instance, while the overall application is represented as a systemd t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The FullJS backend 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


Microservice Architecture

FullJS applications follows a microservice-based server architecture with deep systemd integration. Each individual microservice corresponds to a systemd unit instance, while the overall application is represented as a systemd target.

Starting and Stopping

To start the FullJS server use systemd’s start command. If you are running as a non-root user, you will have to use sudo since this will affect the state of the operating system:

sudo systemctl start fulljs@[instance]

To stop a running FullJS server, you can use:

sudo systemctl stop fulljs@[instance]

Enabling and Disabling Services

The above commands are useful for starting or stopping FullJS during the current session. To tell systemd to start FullJS server automatically at boot, you must enable it.

  • To start the server at boot:
sudo systemctl enable fulljs@[instance]
  • To disable the service from starting automatically:
sudo systemctl disable fulljs@[instance]


Filesystem Layout

The application conforms to the Linux Filesystem Hierarchy Standard (FHS). Executables, data, runtime state, and configuration are separated cleanly:

  • /srv/fulljs/[instance]/ – contains the deployed application
  • /run/fulljs/[instance]/** – runtime files (e.g., sockets, PID files)
  • /var/lib/fulljs/[instance]/** – persistent state data (e.g., storage files)
  • /etc/fulljs/** – configuration files (if any)

Managing the FullJS Application Server

Starting and Stopping

To start the FullJS server use systemd’s start command. If you are running as a non-root user, you will have to use sudo since this will affect the state of the operating system:

sudo systemctl start fulljs@[instance]

To stop a running FullJS server, you can use:

sudo systemctl stop fulljs@[instance]

Enabling and Disabling Services

The above commands are useful for starting or stopping FullJS during the current session. To tell systemd to start FullJS server automatically at boot, you must enable it.

  • To start the server at boot:
sudo systemctl enable fulljs@[instance]
  • To disable the service from starting automatically:
sudo systemctl disable fulljs@[instance]

Keep in mind that enabling a service does not start it in the current session. If you wish to start the service and enable it at boot, you will have to issue both the start and enable commands.

Checking Status

To check the status of the server on your system, you can use the status command:

systemctl status fulljs@[instance]

This will provide you with the server state.

Customizing and Re-branding

You can rebrand FullJS to fit your project name. For example, if your app is called myapp, you can define services like:

systemctl start myapp@microservice1
systemctl start myapp@microservice2

Example Unit File

[Unit]
Description=myapp service
After=network.target auditd.service haproxy.service

[Service]
Type=notify
User=myapp
Group=myapp
RuntimeDirectory=%p/%i
StateDirectory=%p/%i
ExecStart=/usr/bin/fulljs /srv/%p/%i.jss
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
WatchdogSec=30
Environment="DBUS_NAME=com.mydomain.%p.%i"

[Install]
WantedBy=multi-user.target

This way, your services become first-class, brand-aligned components of your Linux environment, while keeping all the benefits of FullJS’s microservice infrastructure.