contrived
a simple way to load contrived data for your node app
Last updated 7 years ago by esetnik .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install contrived 
SYNC missed versions from official npm registry.

#Contrived ###a simple way to load contrived data for your node app


##Usage

  1. Create a contrived/ directory at the root of your node app

    app.coffee
    contrived/
    package.json
    
  2. Create yaml model files for each model you would like to load

    contrived/
      users.yaml
      tasks.yaml
    

    an example users.yaml would look like:

    - firstName:  John
      lastName:   Doe
      email:      jdoe@fake.com
    - firstName:  Jane
      lastName:   Dame
      email:      jdame@fake.com
    
  3. Require the contrived module

    contrived = require 'contrived'
    
  4. Use some contrived data

    console.log contrived.users
    

##Todo

  • [ ] support additional data formats
  • [ ] support nested contrives

Current Tags

  • 0.0.1                                ...           latest (7 years ago)

1 Versions

  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2017 © taobao.org |