achievement.js
v0.0.1-alpha-001
Published
A Node.js library for tracking user achievements and progress
Downloads
8
Maintainers
Readme
Achievement.js
This package is still under development and is not a stable. Use at your own risk or wait for major version 1.0.0
A Node.js library for tracking user achievements and progress using express and MongoDB. Project Architecture can be found here.
Table of Contents
Install
npm install achievement.js --save
Overview
Connect your express app to achievement.js
Achievement.js will automatically monitor your api endpoints for tracking user achievements once connected. All you will need to do is add users and add achievements. Let Achievement.js do the rest.
const express = require('express');
const app = express();
const options = {
{
scope: '/api/achievements',
MongoURI: {
database: 'achievement',
user: 'username',
password: 'password',
host: '127.0.0.1',
port: '27017'
}
}
};
const achievementjs = require('achievement.js')(options);
app.use(achievementjs.router);
API
achievements
The achievements API is used for interacting with Achievement objects.
add(options)
users
The users API is used for interacting with Users and tracking their achievement progress.
add(options)