Skip to content

it's will help you to generate automatic timestamps columns in database with unix format.

License

Notifications You must be signed in to change notification settings

MarkRady/mongoose-unix-timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoose-unix-timestamp

Features

  • create created_at column for auto generate time while create this document in unix format
  • create updated_at column for auto generate time while update this document in unix format

Tech

Mongoose-unix-timestamp uses a number of open source projects to work properly:

  • [node.js] - evented I/O for the backend
  • [Express] - fast node.js network app framework

And of course this is open source and open to contribute on GitHub.

Installation

$ cd /path/to/your/app
$ npm install mongoose-unix-timestamp

Usage

const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const unixTimestamp = require('mongoose-unix-timestamp');

const user = new Schema({
	full_name: String,
	email: String,
});

user.plugin(unixTimestamp);

const model = mongoose.model('User', user);

About

it's will help you to generate automatic timestamps columns in database with unix format.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published