Index
A
- Advanced Packaging Tool (APT) / Installing the prerequisites
- are you sure page
- about / The "Are you sure" page
- array data type, Mongoose schema
- about / Array
- word of caution / Warning – array defined as mixed type
- asynchronous validator / Non-blocking, asynchronous validation
B
- blocking code
- boolean data type, Mongoose schema
- about / Boolean
- buffer data type, Mongoose schema
- about / Buffer
C
- callback() function
- running / Running the callback
- close() method / Calling the close command
- code structure
- about / Code structure
- routes files, adding / Adding the routes files
- routes, tying to Mongoose models / Tying the routes to Mongoose models
- collection
- about / The database – MongoDB
- connection events
- about / Connection events
- connection options
- about / Connection options
- user and pass / Connection options
- db / Connection options
- server / Connection options
- replset / Connection options
- connection string
- about / About the connection string
- port, setting / Setting the port
- database user, specifying / Specifying a database user
- custom SchemaTypes
- about / Custom SchemaTypes
- custom validation
- custom validators
- creating / Doing it your way – create custom validation
- creating, with single function / Single function – no custom error message
- creating, with custom error message / Returning a custom error message
- regular expression, validating / Validating a regular expression
- custom message, pairing out of schema / Taking the messages out of the schema
- multiple validators / Using multiple re-usable validators
- asynchronous validator / Non-blocking, asynchronous validation
D
- data
- querying / Approaches to find and read data
- deleting / Deleting data
- database connection
- closing / Closing the connection
- database connection, closing
- close command, calling / Calling the close command
- with Node process / Closing when the Node process ends
- data interaction
- instance, creating / Creating an instance
- instance, saving / Saving an instance
- database entry, creating / Creating and saving database entry in one step
- database entry, saving / Creating and saving database entry in one step
- methods, chaining / Chaining methods
- Model.create() method / The Model.create() method
- data management
- existing schema, modifying / Data management when modifying existing schemas
- datatypes, Mongoose schema
- about / Data types allowed in schemas
- string / String
- number / Number
- date / Date
- boolean / Boolean
- buffer / Buffer
- ObjectId / ObjectId
- mixed / Mixed
- array / Array
- custom SchemaTypes / Custom SchemaTypes
- data validation
- basics / Mongoose validation – the basics
- error object / Understanding validation errors
- custom validation / Doing it your way – create custom validation
- extending / Extending Mongoose validation
- adding, to project / Adding validation to our project
- date data type, Mongoose schema
- about / Date
- doLogin function / Tracking user login
E
- enum validator / String SchemaType
- exports.create() function / New files and functions
- exports.doCreate() function / New files and functions
- Express
- about / The framework – Express
- installing / Installing Express.js
F
- find-edit-save approach
- findByIdAndRemove() method
- about / Deleting data
- findByIdAndUpdate() method / Model helper methods
- findOneAndRemove() method
- about / Deleting data
- findOneAndUpdate() method / Model helper methods
H
- http.createServer method function / A Node.js example
I
- instance, data interaction
- creating / Creating an instance
- data, adding to / Adding data to the instance
- saving / Saving an instance
- saved data, using / Using the saved data
J
- Jade template files
- layout.jade / Adding the Jade template
- index.jade / Adding the Jade template
- JavaScript
- about / The language and the server – JavaScript and Node
- blocking code / Blocking versus non-blocking code
- non-blocking code / Blocking versus non-blocking code
- callbacks / JavaScript callbacks
- callback, running / Running the callback
- jQuery document.ready method
- about / JavaScript callbacks
K
- key / The database – MongoDB
M
- match validator / String SchemaType
- mixed data type, Mongoose schema
- about / Mixed
- changes, tracking / Tracking changes to Mixed type
- model, Mongoose
- about / Mongoose models
- Model.create() method
- about / The Model.create() method
- Model.find(query) method / Static helper methods – finding data
- Model.findById(ObjectID) method / Static helper methods – finding data
- model.findById method / findByld() – finding a single project
- Model.findOne() method
- used, for searching single user / findOne() – finding a single user
- Model.findOne(query) method / Static helper methods – finding data
- model helper methods, Mongoose
- update() / Model helper methods
- findOneAndUpdate() / Model helper methods
- findByIdAndUpdate() / Model helper methods
- commands, building / Building the commands
- selecting / Which method to choose
- catch / The catch
- MongoDB
- about / The database – MongoDB
- installing / Installing MongoDB
- Mongoose
- about / What Mongoose is all about
- benefits / What is Mongoose good for?
- limitations / What Mongoose is not ideally suited for
- cornerstones / The cornerstones of Mongoose
- models / Mongoose models
- installing / Installing Mongoose
- connection string / About the connection string
- connection options / Connection options
- model methods / Model methods and instance methods
- instance methods / Model methods and instance methods
- project, setting up / Setting up the project
- static model methods / Approaches to find and read data
- Query Builder / Using the QueryBuilder
- model helper methods / Model helper methods
- find-edit-save approach / The three-step find-edit-save approach
- data, deleting / Deleting data
- validators / Default validators
- population / Population – references to other collections
- subdocuments / Subdocuments
- reusable schema plugins / Reusable schema plugins
- Mongoose database connection
- events / Connection events
- Mongoose default connection
- about / Mongoose default connection
- multiple connections, using / Using multiple connections
- Mongoose installation
- direct installation, into project / Direct installation into project
- project dependencies, using / Using project dependencies – package.json
- MongoosePM
- creating / Creating a project
- connection, creating / Creating the connection
- events, catching / Catching the events
- connection, opening at app start / Opening the connection at application start
- database, creating / Creating the database
- single user, finding / findOne() – finding a single user
- multithreaded
N
- Node
- about / The language and the server – JavaScript and Node
- multithreaded / Single-threaded versus multithreaded
- single-threaded / Single-threaded versus multithreaded
- Node.js
- about / The language and the server – JavaScript and Node
- installing / Installing Node.js
- Node.js example
- about / A Node.js example
- Nodemon
- non-blocking code
- npm
- installing / Installing npm
- number data type, Mongoose schema
- about / Number
O
- ObjectId data type, Mongoose schema
- about / ObjectId
P
- package.json file
- population
- about / Population – references to other collections
- data, defining / Defining data for population
- references, saving / Saving population references
- data, retrieving / Retrieving populated data
- results subset, querying / Querying to return a subset of results
- multiple parent items, populating / Populating into multiple parent items
- project, setting up
- code structure / Code structure
- URLs / URLs and routes
- routes / URLs and routes
- projects
- deleting / Deleting individual projects
- projects, editing
- performing / Editing projects
- routes / Routes
- Project schema
- creating / Defining the Project schema
- projectName data type / Defining the Project schema
- createdOn data type / Defining the Project schema
- modifiedOn data type / Defining the Project schema
- createdBy data type / Defining the Project schema
- tasks data type / Defining the Project schema
- improving / Improving the Project schema
- projects list, finding
- res.json() method, used / find() – finding a list of projects and returning JSON to AJAX
- route, setting up / Setting up the route
- view, updating / Updating the view
- AJAX call, building / Building the AJAX call
Q
- Query Builder interface
- about / Using the QueryBuilder
- single-query operation, using / Single query operation
R
- remove() method
- about / Deleting data
- res.json() method / find() – finding a list of projects and returning JSON to AJAX
- reusable schema plugins
- about / Reusable schema plugins
- creating / Creating a schema plugin
- adding, to existing schema / Applying the plugin to an existing schema
- external file, using / Using an external file
- schema middleware, using / Using schema middleware
- sharing, with community / Sharing with the community
- routes
- for user management / Routes for user management
- for project management / Routes for project management
S
- .save method
- about / Using the saved data
- schema, Mongoose
- about / Mongoose schemas, Introducing schemas
- field sizes / Field sizes
- datatypes / Data types allowed in schemas
- location, for writing / Where to write the schemas
- writing / Writing a schema
- modifying / Modifying an existing schema
- default value, setting / Setting a default value
- data, validating / Only allowing unique entries
- userSchema / Our final User schema
- __v / What's that "__v" thing?
- Project schema, creating / Defining the Project schema
- Project schema, improving / Improving the Project schema
- models, building / Building models
- collection name, setting / Setting the collection name
- code / Our complete code
- single-query operation
- using / Single query operation
- single-threaded
- single project, finding
- findById, used / findByld() – finding a single project
- route setup / Route setup
- view, creating / Creating the view
- single user, searching
- findOnes used / findOne() – finding a single user
- login form, creating / Login form
- login action, creating / Login action
- homepage links, adding / Housekeeping – adding homepage links
- static helper methods
- about / Static helper methods – finding data
- Model.find(query) / Static helper methods – finding data
- Model.findOne(query) / Static helper methods – finding data
- Model.findById(ObjectID) / Static helper methods – finding data
- string data type, Mongoose schema
- about / String
- subdocuments
- about / Subdocuments
- creating / Creating subdocuments
- saving / Saving and validation
- validating / Saving and validation
- retrieving / Retrieving subdocuments
- specific subdocument, accessing / Accessing a specific subdocument
- deleting / Deleting subdocuments
- Supervisor
T
- technology stack
- Node.js / The language and the server – JavaScript and Node
- MongoDB / The database – MongoDB
- Express / The framework – Express
- technology stack, installation
- about / Installing the full stack
- prerequisites / Installing the prerequisites
- Node.js, installing / Installing Node.js
- npm, installing / Installing npm
- MongoDB, installing / Installing MongoDB
- Express.js, installing / Installing Express.js
- Mongoose, installing / Installing Mongoose
U
- update() method / Model helper methods, Tracking user login
- user
- deleting / Deleting the user
- user, editing
- user login, troubleshooting / Tracking user login
- perfroming / Editing the current user
- routes, using / Routes in use
- form, setting up / Setting up the form
- controllers, setting up / Setting up the controllers
- three-step approach, using / Committing the edit
- user creating
- data, creating / CRUD – create data
- new user form, adding / Adding a new user form
- Jade template, adding / Adding the Jade template
- view, linking to URL / Linking the view to the URL
- create user function, creating / Adding the create user function
- error trapping / Error trapping
- user session, creating / Creating a user session
- confirmation page, displaying / Displaying the confirmation page
- create project functionality, adding / Adding create project functionality
- routes / Routes
- userSchema
- creating / Introducing schemas
V
- validators, Mongoose
- about / Default validators
- All SchemaTypes / All SchemaTypes
- Number SchemaType / Number SchemaType
- String SchemaType / String SchemaType