Connect a Node.js app to an external database | NodeFlux.eu Docs
Use an external database safely without assuming NodeFlux provides a managed database for customer apps.
Steps
- Create or obtain an external database from a provider you control and collect its host, port, database name, username, password, and TLS requirements.
- Store the connection string or individual settings as protected application configuration, not in source code.
- Configure your database library with connection pooling and a connection timeout appropriate for a small service.
- Start the app and verify it connects without logging credentials or full connection strings.
- Keep independent database backups and test restoring them with a non production copy when possible.
Notes
- The Craftserv.fr database infrastructure described in the NodeFlux Privacy Policy supports the NodeFlux platform; it is not a promise of a managed database for every hosted application.
- Choose a database region close to the app where practical, but design the app to handle temporary connection failures.
Warning
Do not expose a database directly to the public internet without provider firewall rules, strong credentials, and TLS where supported.
Related NodeFlux pages
- Configure environment variables and secrets — Keep bot tokens, API keys, and connection strings out of your source code.
- Hosting Discord.js v14 Bots on NodeFlux Applications — Deploy modern Discord.js v14 bots using gateway intents, environment variables, and event handlers.
- Make a Node.js web app reachable — Bind an Express, Fastify, or similar app to the service port provided by the panel.