New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

json-db-api

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-db-api

Simple JSON API server like jsonbase/myjson

latest
Source
npmnpm
Version
1.4.2
Version published
Maintainers
1
Created
Source

json-db-api

last commit version downloads license HitCount

Simple JSON API server inspired by jsonbase/myjson

Install

# install json-db-api
npm i -g json-db-api

# migrate database
json-db-api --database db.sqlite3 --migrate

Run

# specify database (db.sqlite3 by default)
json-db-api --database my-sqlite-database.sqlite3

# specify port (3000 by defautl)
json-db-api --port 8080

# log as json instead of pino-pretty
json-db-api --notpretty

# check version
json-db-api.cmd --version

Usage

// use longpoll
fetch("localhost:8080/test/note?longpoll=1")
// use json patch
fetch("localhost:8080/test/note?patch=1")
// use both
fetch("localhost:8080/test/note?longpoll=1&patch=1")

Development

# Install dependencies
npm i

# link package
npm link

# run
json-db-api

ToDo

  • Specify database path
  • Long polling
  • JSON patch
  • Code splitting with fastify plugins
  • Tests
  • Nodemon
  • Eslint

Keywords

json

FAQs

Package last updated on 02 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts