2017-11-15から1日間の記事一覧
Express+mongooseで RDBのようなAUTO INCREMENTフィールドを実現する mongoose-sequence パッケージをインストール $ npm install --save mongoose-sequence app.js var mongoose = require('mongoose'); const option = { useMongoClient: true, }; mongoos…
nexpressスキーマ構成を定義する。 必要最低限の要件を元にシンプルな構造を定義する。 1. Schemaに対する要件 ユーザー登録がエントリーポイント ユーザー ユーザーはサイトを複数作成できる サイトを新規作成したとき、自動的にそのサイトの最高権限ユーザ…