warehouse

2018-11-09 admin

warehouse是什么

什么是warehouse,Simple JSON-based database

warehouse使用教程帮助文档

Warehouse

Build Status NPM version Coverage Status

A JSON database with Models, Schemas, and a flexible querying interface. It powers the wildly successful static site generator Hexo.

Installation

$ npm install warehouse

Usage

var Database = require('warehouse');
var db = new Database();

var Post = db.model('posts', {
  title: String,
  created: {type: Date, default: Date.now}
});

Post.insert({
  title: 'Hello world'
}).then(function(post){
  console.log(post);
});

Test

$ npm test

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-44980.html

文章标题:warehouse

回到顶部