What are the parts of a url?
protocol: domain name/parameters ? queries
What is the DOM?
Document-Object-Model, a copy of the code from the server that can be manipulated with javascript
What are the typical parts of a server js file?
Is Node primarily a sync or async programing language?
Async - it’s built on callbacks
How many threads does node have?
1 thread (thread = an operation that is happening in the same time with another one)
What are the projects suitable for node?
Single thread websites with simple NoSQL DBs and API support
What is the difference between a SQL and NoSQL database?
SQL is a relational data model (all data is structured the same, vertically scalable)
NoSQL is a document data model (data can be structured differently, horizontally scalable)
What are the three definitions of Mongoose?
What is a callback function?
A callback is function which is sent as a parameter to another function in order to be used after the initial function runs
- example:
$("#btn_1").click(function() {
alert("Btn 1 Clicked");
});What is a closure function?
A closure is an inner function that has access to the outer (enclosing) function’s variables and the global variables
What is a recursive function?
What are RESTful web services?
Clients can make requests that elicits a response in HTML, XML or JSON format
Difference between PUT and PATCH?
PUT is used to update a resource and PATCH is used to modify it
What are common CRUD operations?
GET, POST, PUT, PATCH, DELETE
What are CRUD operations?
Create, Read, Update and Delete - requests made to the server in order to get a response.
What does MCV stand for?
Model (database), Controller (server), View (client)
What are the most common npm apps being used?
express, mocha, chai, morgan, faker, bcryptjs, body-parser, mongo, mongoose
Describe the HTTP requests/response life cycle.
Client sends a request - request method and path are used to route to correct request handler.
Server sends a response object with status code and headers, and body if response has content
Describe the architecture of a basic Express app. How is it organized?
Describe how a Mongo database is structured
Mongo is made up of collections of documents.
A document is an object comprised of keys and values. Mongo accepts strings, integers, floating point decimals, booleans, null, arrays, objects, timestamps, and object ids as value types.
What is the purpose of bcrypt in the authentication process?
bcrypt is an adaptive function: over time, the iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks
How do JSON web tokens work?
JWT digitally signs tokens to prevent fraud. When the server generates the token, it generates a signature by combining the contents of the token with a secret private key using an encryption algorithm.