open-index/open-npm huggingface dataset:
npm package: @netshards/ns-monitor
Description: NetShards monitoring module
Author: Gevorg Aznauryan aka GAZ
Latest version: 1.0.4

# @netshards/ns-monitor module

This module is a part of NetShards infrastructure
>The main purpose of ns-monitor is to make it easy to plug any app or service into the NetShards infrastructure. It acts as client/server transport, state monitoring and metadata delivery module within the NetShards infrastructure.

### Installation

The easiest way is to keep `ns-monitor` as a Dependency in your `package.json`, by running

```bash
$ npm install --save @netshards/ns-monitor
```

### Usage 
#### Server

The `options` attribute allows you to initialize properties on the ns-monitor server object, so

```js
var options = {
    port: 9999,
    namespace: '/netshards'
};
var server = require(@netshards/ns-monitor).server(options);
```

#### Client

The `options` attribute allows you to initialize properties on the ns-monitor client object, so

```js
var options = {
    endpoint: "http://localhost:9999",
    namespace: '/netshards',
    meta: {key:'value'}
};
var client = require(@netshards/ns-monitor).client(options);
```

### Tests

```bash
$ npm test
```

### License
[MIT License](./LICENSE)
npm package: @netshards/ns-omi-core
Description: Omi game test using redux managed state
Author: Gevorg Aznauryan aka GAZ
Latest version: 1.0.3

# @netshards/ns-omi-core module

This module is a part of NetShards infrastructure
>ns-omi-core is Omi game core powered by Redux (server side)
>It is a sample of game core pluggable into the NetShards infrastructure. It is providing management, persistence, hot-reloading and archivation of the game state.

### Installation

The easiest way is to keep `ns-omi-core` as a Dependency in your `package.json`, by running

```bash
$ npm install --save @netshards/ns-omi-core
```

### Usage 
#### Server

The `options` attribute allows you to initialize properties on the ns-omi-core, so

```js
import {createCore, storage} from 'ns-omi-core';

var options = {
    path: /home/yourname/archive/,
    room: 'room name or ID or UUID...' // My preference is node-uuid v4
};

// Returns promise
createCore(options).then((store)=> {
    
    // actions
    
}
```

Using Redux actions to roll the globe. Supported actions: [ADD_PLAYER,UPDATE_SCORE,ADD_ROUND,INIT_ROUND,SET_TRUMPH,DEAL,PREVALIDATE,PLAY_ANY,SHIFT_TURN,PLAY-SHIFT-PREVALIDATE]
Example usage:

```js

createCore(options).then((store)=> {
    
    //adding 4 players to the store
    for(var i=1;i<=4;++i) {
        store.dispatch({
            type: 'ADD_PLAYER',
            player: {id: i}
        });
    }
    
}
```

### Tests

```bash
$ npm test
```

### License
[MIT License](./LICENSE)