
We will learn how to create the Node.Js server from scratch and adding ES6 support through babel-cli
Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in typecasting, validation, query building, business logic hooks and more, out of the box. You will learn how to integrate MongoDB using mongoose package.
In this lesson, you will how to the design the project structure for our demo application. You will learn the best practices to design the app structure
Imagine you run facebook and you want visitors to sign up on the website with real names and not something like l337_p@nda in the first name field. How would you define the limitations of what can be inputted and validate it against the set rules?
This is joi, joi allows you to create blueprints or schemas for JavaScript objects (an object that stores information) to ensure validation of key information.
In this lesson, you will learn how to create an HTTP POST endpoint to save the song into MongoDB
In this lesson, you will learn how to create an HTTP GET endpoint to fetch all the records from MongoDB
Pagination is the process of separating print or digital content into discrete pages. It Refers to numbering pages in a document. It also Refers to dividing a document into pages. We are going to use `mongoose-paginate` plugin for pagination in mongoose
In this lesson, you will learn how to find the single record from the MongoDB. You will also learn how to send the routing param in express
I will show you how to delete the record from MongoDB using delete endpoint
You need to create the HTTP PUT endpoint to update the record .You will earn how to edit the existing song in the MongoDB.
Swagger is the world’s largest framework of API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API lifecycle, from design and documentat
Primitive data types in the Swagger Specification are based on the types supported by the JSON-Schema Draft 4. Models are described using the Schema Object which is a subset of JSON Schema Draft 4.
In this lesson, you will learn how to add the documentation for the create record endpoint.
In this lesson, you will learn how to add the documentation for the find all songs endpoint.
In this lesson, you will learn how to add the documentation for the find song endpoint
In this lesson, you will learn how to add the documentation for the delete song endpoint
In this lesson, you will learn how to add the documentation for the update song endpoint
An authenticated user can create playlists and view all the songs. In this lesson, I will show you how to create a user model in Mongoose
In this lesson, we will create a signup route for user registration.
A user can create the new account in our system. I will show you how to encrypt the user password and save new user in MongoDB.
In this lesson, you will learn how to add the documentation for the user signup endpoint. We will create a new user model in Swagger definition model file.
An authenticated user can view all the songs. You will learn how to implement the login feature
In this lesson, we will create a json web token using jwt package.JSON Web Token (JWT) is a means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is digitally signed using JSON Web Signature (JWS) and/or encrypted using JSON Web Encryption (JWE)
In this lesson, we will create a documentation for user login endpoint. We will use the same user definition model for adding documentation
Passport is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped in to any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter, and more.
Passport-JWT is a strategy for authenticating with a JSON Web Token.
This module lets you authenticate endpoints using a JSON web token. It is intended to be used to secure RESTful endpoints without sessions.
Route middleware is an extremely powerful tool in Node.js and Express. As an example of how powerful Express's route middleware can be, the awesome Passport.js that handles authentication is a route middleware tool.
Unfortunately request doesn’t come with an easy convenience parameter you can use, so you need to provide it by yourself. The common way is to add it as an extra HTTP header.In this lesson, we will add documentation for Auth header in Swagger
In our demo Application we have two roles, artist role and user role. Artist can create, delete and update the songs. A standard authenticated user can view all the songs and create playlists
Role-based access control (RBAC) is a method of regulating access to computer or network resourcesbased on the roles of individual users within an enterprise. In this context, access is the ability of an individual user to perform a specific task, such as view, create, or modify a file.
In this lesson, we will add documentation for user role in swagger document
MongoDB has the join-like $lookup aggregation operator in versions >= 3.2. Mongoose has a more powerful alternative called populate(), which lets you reference documents in other collections.
Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). We may populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query. Let's look at some example
Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). We may populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query. Let's look at some examples.
In this lesson, we will show you how to develop One-to-Many related document with NodeJs/Express, MongoDB using Mongoose.
In this lesson, we will save new record in mongoose model.
Population is the process of automatically replacing the specified paths in the document with document(s) from other collection(s). We may populate a single document, multiple documents, plain object, multiple plain objects, or all objects returned from a query. Let's look at some examples. You will learn how to populate multiple records in a single document
In this lesson, we will add documentation for multiple paths in Swagger document. We will update our definition model object in swagger
Heroku is a cloud platform that lets companies build, deliver, monitor and scale apps — we're the fastest way to go from idea to URL, bypassing all those infrastructure headaches. Heroku is a service that enables companies to spend their time developing and deploying apps .
mLab is the leading Database-as-a-Service for MongoDB, powering over half a million deployments worldwide.
Heroku cli provides a create command to create new heroku application. The command’s output shows that the app will be available at http://example.herokuapp.com. The second URL, https://git.heroku.com/example.git, is the remote git repository URL; by default, the heroku create command automatically adds a git remote named “heroku” pointing at this URL.
In this lesson, we will create API KEYS for both production environment or development environment
Heroku manages app deployments with Git, the popular version control system. Before you can deploy your app to Heroku, you need to initialize a local Git repository and commit your application code to it.
Git remotes are versions of your repository that live on other servers. You deploy your app by pushing its code to a special Heroku-hosted remote that’s associated with your app.
To deploy your app to Heroku, you typically use the git push command to push the code from your local repository’s master branch to your heroku remote, like s
In this lesson, we will refactor the hostname for the heroku server in the Swagger document file.
A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data.
RESTful Web APIs allow developers to create modern applications by leveraging the data on the Internet. Since JavaScript is the language of the web, building APIs using Node.js provides a seamless development experience on both the front end and the back end.
In this course, we will build APIs for Music application. There are two roles(Artist, User) in our demo application.An artist can create/edit/delete the song. A user can view all the songs. A user can also create and view the songs playlist.
You will learn how to create the Apis for users, and artists. I will teach you how to add JWT authentication in Nodejs. I will also show you how to add role-based authentication in real-world application
You'll learn to:
This course is for you if:
You’re a back-end developer who is used to working with frameworks like ASP.NET, Rails, Django, etc. You want to add Node.js to your toolbox.
You’re a front-end developer and want to transition to full-stack development.
You’ve tried other Node.js tutorials and found them to be too slow, out-of-date, and boring!
Having Node.js on your resume helps you find more jobs and make more money.