deck-service

1.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i deck-service

Weekly Downloads

2

Version

1.1.1

License

ISC

Last publish

Collaborators

  • squirechuck