{"id":25977,"library":"ndx-server","title":"ndx-server","description":"A lightweight, modular server framework built on Express and Alasql, providing a schemaless SQL database that treats JavaScript objects as first-class citizens. Version 0.18.1 is the latest stable release, with no regular update cadence. It eliminates the need for a dedicated database server, persists to S3 with minimal reads/writes, and uses sessionless tokens that survive server restarts. Key differentiators include auto-loading of modules from startup, services, and controllers folders, built-in authentication and token generation, and a plugin ecosystem for auth, sockets, and database backups. Designed for rapid prototyping and small-to-medium scale applications, it also supports scaling via ndx-sync.","status":"active","version":"0.18.1","language":"javascript","source_language":"en","source_url":"https://github.com/ndxbxrme/ndx-server","tags":["javascript"],"install":[{"cmd":"npm install ndx-server","lang":"bash","label":"npm"},{"cmd":"yarn add ndx-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add ndx-server","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Foundation HTTP server and routing","package":"express","optional":false},{"reason":"Provides the in-memory SQL database with persistence","package":"alasql","optional":false}],"imports":[{"note":"CommonJS default export via require('ndx-server') works, but named destructure fails.","wrong":"const { ndx } = require('ndx-server');","symbol":"default (ndx)","correct":"import ndx from 'ndx-server';"},{"note":"No ES module named export; use default import.","wrong":"const NdxServer = require('ndx-server').default;","symbol":"default (ndx)","correct":"const ndx = require('ndx-server');"}],"quickstart":{"code":"const ndx = require('ndx-server')\n  .config({\n    database: 'myapp',\n    tables: ['users', 'tasks'],\n    port: 3000\n  })\n  .controller(function(ndx) {\n    ndx.app.get('/api/hello', function(req, res) {\n      res.json({ message: 'Hello from ndx-server!' });\n    });\n  })\n  .start();\n\nconsole.log('Server running on port 3000');","lang":"javascript","description":"Creates a minimal ndx-server instance with one route, using in-memory database with two tables."},"warnings":[{"fix":"Ensure no stray files are placed in these directories, or disable auto-loading via config.","message":"Auto-loading of modules from /startup, /services, and /controllers folders may cause unexpected behavior if those directories exist with unintended files.","severity":"breaking","affected_versions":">=0.15.0"},{"fix":"Consider using a proper database server or use ndx-sync for scaling but be aware of limitations.","message":"ndx-server uses Alasql which is not suitable for concurrent write-heavy production workloads.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install alasql` alongside ndx-server.","cause":"Alasql is a peer dependency not installed automatically.","error":"Error: Cannot find module 'alasql'"},{"fix":"Use `const ndx = require('ndx-server');` and chain methods on the returned object.","cause":"Using the module incorrectly, e.g., importing as a named export.","error":"TypeError: ndx.config is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}