# node-jsondb-srv

> jsondb-service: Socket service to accept json database client connections and requests for the json database

Latest version **1.0.1** (published 2016-04-23) · 0 weekly downloads

## Install

```sh
npm install node-jsondb-srv
pnpm add node-jsondb-srv
yarn add node-jsondb-srv
bun add node-jsondb-srv
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-04-23 |
| First published | 2016-04-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matt Johnson |
| Maintainers | mcmlxxix |
| Keywords | utility, json, database, jpath, objects |

## Links

- npm: https://www.npmjs.com/package/node-jsondb-srv
- Repository: https://github.com/mcmlxxix/node-jsondb-srv
- Homepage: https://github.com/mcmlxxix/node-jsondb-srv#readme
- Issues: https://github.com/mcmlxxix/node-jsondb-srv/issues
- npm.io page: https://npm.io/package/node-jsondb-srv

## Dependencies (2)

- [node-jsondb](https://npm.io/package/node-jsondb.md) git://github.com/mcmlxxix/node-jsondb.git
- [node-logger](https://npm.io/package/node-logger.md) git://github.com/mcmlxxix/node-logger.git

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2016-04-23
- 1.0.0 — 2016-04-21

## README

# node-jsondb-srv

Socket service for [node-jsondb](https://github.com/mcmlxxix/node-jsondb) 

## Description

[node-jsondb-srv](https://github.com/mcmlxxix/node-jsondb-srv) is a static TCP socket service which accepts connections on a designated port from an instance of [node-jsondb-client](https://github.com/mcmlxxix/node-jsondb-client). 

## Installation

'npm install node-jsondb-srv'

## Configuration

'./settings/settings.js'

	settings = {
		"host":				"localhost",
		"port":				10089,
		"maxconnections": 	200
	}

'./settings/databases.js'

	test:{
		file:		"./db/test.json",
		locking:	"transaction",
		users:{
			admin:	"rw",
			guest:	"r"
		}
	}
	
'./settings/users.js'

	users = {	/* 	<name> 			:	<password> */
					"test"			:	"test",
					"guest"			:	"",
					"admin"			:	"admin"
	}
	
## Locking

The locking mechanism for a given database can either be via transactions, full-database locking, or disabled entirely.

### Transaction: 

	locking="transaction"
	
With transaction locking, any updates to the database must be done with the target records locked for writing. Given that a single request/query may include multiple records, any locks or writes that fail will cause the entire transaction to be cancelled (the database retains its prior state).

### Full: 

	locking="full"
	
With full locking, the entire database is locked for writing before any changes are made. This approach may be faster for situations where updates are infrequent. The process of locking individual records can slow things down.

### None 

	locking=null
	
As the section implies, there is no locking at all. Any client can write without locking. Useful for chat room databases where you are more interested in receiving subscription updates than retaining data.

## Database

Database files are located in './db/' and are stored in '.JSON' format

## Usage

'node node-jsondb-srv'

---
_Source: https://npm.io/package/node-jsondb-srv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
