{"library":"startupdb","title":"startupDB","type":"library","description":"A file-based database for Express.js applications. Its current stable version is 3.0.19. It stores data in JSON files on the filesystem, making it suitable for small projects or prototyping where a full database is unnecessary. Key differentiators include zero configuration, automatic file management, and tight integration with Express routing. It is released as needed on npm with no fixed cadence. Compared to alternatives like lowdb, startupDB offers simpler file handling and is specifically designed to work as middleware for Express.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install startupdb"],"cli":null},"imports":["const startupDB = require('startupdb')","app.use(startupDB())","req.db.get('users')"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/bitsplitter/startupDB","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/startupdb","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"const express = require('express');\nconst startupDB = require('startupdb');\n\nconst app = express();\nconst PORT = process.env.PORT || 3000;\n\napp.use(startupDB());\n\napp.get('/users', (req, res) => {\n  const users = req.db.get('users') || [];\n  res.json(users);\n});\n\napp.post('/users', (req, res) => {\n  const user = req.body;\n  req.db.push('users', user);\n  res.status(201).json(user);\n});\n\napp.listen(PORT, () => {\n  console.log(`Server running on port ${PORT}`);\n});","lang":"javascript","description":"Sets up Express with startupDB middleware, demonstrating GET and POST routes to interact with a file-based 'users' collection.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}