JavaScriptだけでWebサイト開発

node.js + Express + mongodb系 + React でサービスを作るメモ

2017-11-15から1日間の記事一覧

mongooseでauto increment のフィールド定義と動作確認

Express+mongooseで RDBのようなAUTO INCREMENTフィールドを実現する mongoose-sequence パッケージをインストール $ npm install --save mongoose-sequence app.js var mongoose = require('mongoose'); const option = { useMongoClient: true, }; mongoos…

node.js+React CMS を設計する(データベース仕様)

nexpressスキーマ構成を定義する。 必要最低限の要件を元にシンプルな構造を定義する。 1. Schemaに対する要件 ユーザー登録がエントリーポイント ユーザー ユーザーはサイトを複数作成できる サイトを新規作成したとき、自動的にそのサイトの最高権限ユーザ…

©ichi-bit