Configuration
bananaDB provides a simple CLI with options for customizing the server.
These flags let you control the port, database file, and CORS settings.
CLI Options
-p, --port <number>
Set the port for the server to run on.
Default: 3000
npx bananadb --db db.json --port 4000
-d, --db <file>
Specify the JSON file to use as your database.
Default: db.json
npx bananadb --db mydata.json
-w, --watch <file>
Alias for --db
β provided for familiarity with json-server
.
npx bananadb --watch db.json
--no-cors
Disable CORS headers. By default, CORS is enabled so you can call bananaDB from a browser or front-end framework.
npx bananadb --db db.json --no-cors
Defaults
- Database file β
db.json
(created if missing) - Port β
3000
- CORS β enabled
π Next: Contributing
Last updated on