0.0.1 • Published 8 years ago

loopback-timestamps v0.0.1

Weekly downloads
5
License
ISC
Repository
github
Last release
8 years ago

loopback-denormalize

Add created_at and updated_at fields in loopback mongodb models

Install

  1. Add "loopback-timestamps": "latest" to your package.json file then run npm install OR run npm install loopback-timestamps
  2. Set the module in your Entity.js

Sample: Product Entity.

 require('loopback-timestamps')(Product);

Info

Methods added to your entity

  1. Before Save observer who automatically update or create created_at and updated_at fields

Enjoy ;)