Skip to content

Mongoose document models used in ql-stats-manager and ql-stats-api

Notifications You must be signed in to change notification settings

swallentin/ql-stats-models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quake Live Mongoose Schemas

Quick Start

    npm install ql-stats-models
    var mongoose = require('mongoose'),
        connection = mongoose.createConnection('mongodb://localhost/my-db');
        
    require('ql-stats-models').register(connection).then(function (connection) {
        var Player = connection.model('Player'),
            player = new Player({
                steam_id: 'abcd'
            });
            
            player.save().then(function (result) {
                console.log(result);
            });
        
    });
        

Running tests

Running Mocha recursive with watch is broken due to some underlying issue with mongoose, working on solving it.

    $ mocha test --recursive --watch    

The tests also acts as documentation on how to use these schema

How could I use these schemas

Start a new git repository and npm install ql-server-monitor ql-stats-models --save. Start monitoring your servers and when they fire game events, use the GAME EVENT data with the ql-stats-models.

About

Mongoose document models used in ql-stats-manager and ql-stats-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published