Node.js on Falix

Everything the Node.js application decides for you — the index.js entry file, automatic npm install, SERVER_PORT — and how to work with it instead of against it.

Skip the setup This guide has a one-click starter template that installs everything below onto your server.

The Node.js application turns your Falix server into a machine that runs JavaScript: Discord bots, websites, APIs, tools — anything Node can do. There are only a few Falix-specific rules to learn. Once you know them, any Node tutorial on the internet works here unchanged.

At a glance
You need A Falix server running the Node.js application
Plan Any — on free it runs while your session timer has time left, premium runs 24/7
Time Ten minutes
No server yet? Create your first app server

The four rules

  1. Your code starts from index.js. When you press Start, Falix runs node index.js in your server folder. If your entry file is named something else, change the Main file variable on the Settings page — no premium needed. (One catch: the field holds at most 16 characters, so keep the path short.)

  2. Dependencies install themselves. If a package.json exists, npm install runs automatically every time the server starts, before your code. You never run npm by hand — you edit package.json, restart, and watch the install happen in the console.

  3. Your public port is SERVER_PORT. Anything that listens for connections must read the port from the environment and bind 0.0.0.0:

    const PORT = process.env.SERVER_PORT || 8080;
    server.listen(PORT, '0.0.0.0', () => {
      console.log(`Listening on port ${PORT}`);
    });

    Hard-coding port 3000 or binding localhost are the two classic "works on my PC, not on the server" mistakes — see Your first web app. Bonus: the panel watches the console for the word Listening to flip your server's status to online, so a log line like the one above is more than decoration.

  4. The console is your window. Everything your app prints appears on the Console page. When something breaks, the answer is almost always there — read from the top, because the first error is usually the real one.

🎯 Good to know: Need to pass arguments to your script? The Additional Arguments variable (NODE_ARGS) is tacked on after the filename, so they reach your code as process.argv — not node itself. It can't set node flags like --max-old-space-size; those go before the file, which means editing the full startup command (premium only).

Try it: hello world

Deploy the Node.js Hello World template from this page (it only overwrites files with the same names). Start the server and the console shows the greeting, your Node version, and a Listening on port … line. Open your server's address (Network page) in a browser and you'll see the page. Now open index.js in the File Manager, change the message, restart, refresh. That loop — edit, restart, check the console — is Node development on Falix.

Adding packages

Want to make HTTP requests with axios? Open the Packages page in your server menu, type axios into the Install package panel, and press Install. The job runs under Tasks, your package.json is updated for you, and after a restart require('axios') works. The same page shows every dependency you have, flags outdated ones, and warns about known security problems — worth a visit even when nothing is broken.

The console knows about missing packages too: if your app crashes with Cannot find module 'axios', the panel offers to open Packages — or install the missing package in one click.

If you prefer editing files (or your project comes from Git), the underlying mechanics are plain npm: dependencies live in package.json, and npm install runs on every start. Both paths end in the same place. Packages with native code (like better-sqlite3) work as well — they ship prebuilt binaries for the server's Linux environment.

What about TypeScript?

⚠️ Heads up: A .ts main file will not run on current Node versions here — don't fight it.

Either compile on install (the TypeScript Discord bot guide shows the exact postinstall recipe, and it applies to any TS project, not just bots) or use the Bun application, which runs TypeScript natively.

A different file, several apps, and reinstalls

Your entry point is just the Main file variable — point it anywhere in your project (keep the path to 16 characters). To run a genuinely separate app, though — a second bot, another API — don't wedge it into the same folder. Give it its own Instance: an isolated application, files, and startup on the same server, switched like a save slot.

🎯 Good to know: node_modules isn't yours to keep. A reinstall — or switching the server to a different application — can wipe your files, and node_modules goes with them. You don't rebuild it by hand: because npm install runs on the next start, it comes right back. Guard your own source and data instead (managed databases are the safe home for data).

Picking a Node version

The application defaults to a current LTS. You can switch between Node 12 and Node 25 on the Settings page (the runtime version dropdown) on any plan.

💡 Tip: Switch the Node version when a dependency demands a specific major version; otherwise the default is fine.

When things go wrong

  • Cannot find module 'xyz' — the package isn't in package.json, or the install above it in the console failed. Scroll up and read the npm output first.
  • Server starts, then immediately stops — your script finished. That's not a crash: a bot or web server keeps running because a client or listener stays open; a script that only prints exits cleanly.
  • Nothing reachable in the browser — port or bind-address problem: I can't reach my app.
  • Killed out of nowhere under load — likely memory: Out of memory.
Cheat sheet
Entry file index.js (Main file variable; the field holds at most 16 characters)
Dependencies npm install runs automatically on start when a package.json exists
Web port rule Read SERVER_PORT, bind 0.0.0.0
Versions Node 12 to Node 25 on the Settings page (any plan)

Next steps

Was this guide helpful?