Spanish Total.js
English
Documentation For AI agents
Contents

Run in production

Choose the port and address, protect the designer and keep LessCode running.

.md GitHub
On this page

LessCode has no sign-in. Anyone who can open the designer can change your flow and run code on your server. Plan access before you put LessCode on a network.

Listen only on the server itself

By default LessCode listens on every network interface. To accept connections only from the same machine, open index.js and remove the two slashes at the start of this line:

// options.ip = '127.0.0.1';

so that it reads:

options.ip = '127.0.0.1';

Restart LessCode. The terminal now shows the address 127.0.0.1.

Choose the port

Pass the port when you start LessCode:

node index.js 8000

With Docker, change the first number of -p 8000:8000.

Protect the designer and your endpoints

  • Put a reverse proxy, such as Nginx, in front of LessCode. Use HTTPS and allow only trusted people to reach the designer address.
  • Your endpoints use the same port as the designer. If the public must reach your endpoints, let the proxy forward only their paths (for example /api/) and protect the root address.
  • Keep the LessCode port closed in the firewall.

Keep it running

  • Run LessCode under a service manager or as a Docker container that restarts, so it starts again after a reboot.
  • Wait a few seconds after your last change before you stop or restart it. See Apply and save.
  • Back up your flow regularly.
Made in Europe