Docker Compose を用いて、アプリケーションとデータベースのコンテナを連携させる方法を理解する。 TypeScript プロジェクトを初期化し、必要なライブラリを導入できる。 TypeScript のコードから MongoDB に接続し、データベース操作を行える。 CRUD (Create, Read, Update, Delete) の各操作を実装できる。
Almost every modern web application will need a REST API for a client to talk to, and in almost every scenario, that client is going to expect JSON. The best developer experience is a stack where you ...
export interface IUser extends Document: TypeScriptの Interface を使って、Userドキュメントが持つべきプロパティ(name, ageなど)を型として定義します。 mongoose.Document を継承することで、_id などのMongoDBが持つプロパティも型に含まれます。 const UserSchema: Schema = ...