Dubnium
v3
v3
  • Overview
  • API
    • Initialize
    • Manage
    • Get
    • Edit
    • Search
    • Miscellaneous
    • Middleware
    • Versioning
  • TEMPLATES
    • JSON
    • String
  • EXTENSIONS
    • Setup
    • Create
    • Find
  • OTHER
  • CLI
  • Events
  • Update Log
  • EXTERNAL LINKS
    • Need more help?
    • Report an Issue
Powered by GitBook
On this page

Was this helpful?

  1. API

Initialize

How to get started with Dubnium.

PreviousOverviewNextManage

Last updated 1 year ago

Was this helpful?

const Dubnium = require('dubnium')
const db = new Dubnium('dirPath', 'ext', options)
const db = new (require("dubnium"))("dir", "ext", options)
import Dubnium from 'dubnium'
const db = new Dubnium('dirPath','ext', options)

You can initialize as many databases as you want

Parameters

Name
About
Type
Required

dirPath

The path to the directory to store Records.

String

ext

Custom file extension (default: json)

String

options

Options

Object

options.name

Database name

String

options.force

Enable force overwriting of a preexisting Record.

Boolean

options.preserveConfig

Set to false to not overwrite the config file

Boolean

options.versioning

Read more in .

Object

options.requireRoot

Functions to require root access to run

Array

options.template

Require all new JSON Records to follow a template, or Dubnium will throw an error

Versioning
Template