1.1.1 • Published 7 years ago

deck-service v1.1.1

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

deck-service

Installation

$ npm install

Usage

Node.js

var DeckService = require('deck-service').deckService;
var deckService = new DeckService();
console.log(deckService.getAllDecks());

var basicDeck = deckService.getDeckByName("Basic Deck");
console.log(basicDeck.cards);
basicDeck.shuffle();
console.log(basicDeck.cards);

Mounting endpoints to an existing Express app

var express = require('express');
var apiController = require('deck-service').deckExpressRouter;

app.use('/myapp', apiController);

Test with a GET request to /myapp/api/v1/decks

Test

To run the tests in the spec folder: $ npm test

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago