Mongoose for Application Development. (2013)
- Record Type:
- Book
- Title:
- Mongoose for Application Development. (2013)
- Main Title:
- Mongoose for Application Development.
- Other Names:
- Holmes, Simon
- Contents:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introducing Mongoose to the Technology Stack; The technology stack -- Node.js, npm, MongoDB, and Express; The language and the server -- JavaScript and Node; Single-threaded versus multithreaded; Blocking versus non-blocking code; The database -- MongoDB; The framework -- Express; What Mongoose is all about; What is Mongoose good for?; What Mongoose is not ideally suited for; The cornerstones of Mongoose; Mongoose schemas; Mongoose models; Installing the full stack. Installing the prerequisitesInstalling Node.js; Installing npm; Installing MongoDB; Installing Express.js; Installing Mongoose; Direct installation into project; Using project dependencies -- package.json; Creating a project; Summary; Chapter 2: Establishing a Database Connection; Mongoose default connection; Using multiple connections; About the connection string; Setting the port; Specifying a database user; Connection options; Closing the connection; Calling the close command; Closing when the Node process ends; Connection events; Connecting our project; Creating the connection. Catching the eventsOpening the connection at application start; Creating the database; Summary; Chapter 3: Schemas and Models; Introducing schemas; Field sizes; Data types allowed in schemas; String; Number; Date; Boolean; Buffer; ObjectId; Mixed; Tracking changes to Mixed type; Array; Warning -- array defined asCover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introducing Mongoose to the Technology Stack; The technology stack -- Node.js, npm, MongoDB, and Express; The language and the server -- JavaScript and Node; Single-threaded versus multithreaded; Blocking versus non-blocking code; The database -- MongoDB; The framework -- Express; What Mongoose is all about; What is Mongoose good for?; What Mongoose is not ideally suited for; The cornerstones of Mongoose; Mongoose schemas; Mongoose models; Installing the full stack. Installing the prerequisitesInstalling Node.js; Installing npm; Installing MongoDB; Installing Express.js; Installing Mongoose; Direct installation into project; Using project dependencies -- package.json; Creating a project; Summary; Chapter 2: Establishing a Database Connection; Mongoose default connection; Using multiple connections; About the connection string; Setting the port; Specifying a database user; Connection options; Closing the connection; Calling the close command; Closing when the Node process ends; Connection events; Connecting our project; Creating the connection. Catching the eventsOpening the connection at application start; Creating the database; Summary; Chapter 3: Schemas and Models; Introducing schemas; Field sizes; Data types allowed in schemas; String; Number; Date; Boolean; Buffer; ObjectId; Mixed; Tracking changes to Mixed type; Array; Warning -- array defined as mixed type; Custom SchemaTypes; Where to write the schemas; Writing a schema; Modifying an existing schema; Setting a default value; Only allowing unique entries; Our final User schema; What's that ""__v"" thing?; Why is this needed?; Defining the Project schema. Improving the Project schemaBuilding models; Instances; Interacting with instances; Finding a single instance; Finding many instances; Considerations when choosing your model name; Setting the collection name; Overriding the collection name in the schema; Overriding the collection name in the model; Building models from our schemas; Our complete code; Summary; Chapter 4: Interacting with Data -- an Introduction; Model methods and instance methods; Setting up the project; Code structure; Adding the routes files; Tying the routes to Mongoose models; URLs and routes; Routes for user management. Routes for project managementSummary; Chapter 5: Interacting with Data -- Creation; Creating an instance; Adding data to the instance; Saving an instance; Using the saved data; Creating and saving database entry in one step; Chaining methods; The Model.create() method; CRUD -- create data; Adding a new user form; Adding the Jade template; Linking the view to the URL; Adding the create user function; Error trapping; Creating a user session; Displaying the confirmation page; Try it out!; Adding create project functionality; Routes; New files and functions; Summary. Chapter 6: Interacting with Data -- Reading, Querying, and Finding. … (more)
- Publisher Details:
- Place of publication not identified : Packt Publishing
- Publication Date:
- 2013
- Extent:
- 1 online resource
- Subjects:
- 005.7585
COMPUTERS -- Programming Languages -- Java
Web site development
Database management
Database management
Web site development
COMPUTERS -- Internet -- Application Development
COMPUTERS -- Information Technology
Electronic books - Languages:
- English
- ISBNs:
- 1299832377
9781299832374
9781782168201
1782168206
9781782168195
1782168192 - Notes:
- Note: Print version record.
- Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.86810
- Ingest File:
- 01_035.xml