This course will guide you through building a real-world web application using NodeJS, Express, and MongoDB.
You’ll start with using the Jade template library and Bootstrap framework to create clean and maintainable code for your app. You will then see how to put MongoDB to work, store data for your app, and incorporate best-practices such as modularization. You’ll go beyond the basics to include authentication, test-driven-development, and powerful time-saving tools to get the app ready for deploying. You will also explore CSS preprocessors and create RESTful services that make the best of MVC libraries and add that extra edge to your app.
After completing this series, you’ll be ready to start building and deploying web applications of your own.
Matthew Nuzum has been developing web applications since 1999 and worked for several start-ups including Canonical, makers of Ubuntu, as well as Fortune 500 companies. He has a passion for helping others learn new technologies and has written numerous tutorials and help documents as well as running a web-focused user group based in his hometown of Des Moines.
In order to begin using ExpressJS, you’ll need to globally install a helper command-line application.
Windows users need to ensure that they use the proper terminal in order to get the best results.
The best way to test your recently installed tool is to use it to build a quick and simple web app.
The ExpressJS command line tools generates a full function, to use as a foundation.
Take a look at the different kinds of files that are created as a part of the sample app creation.
Jade helps you to build clean web pages that combine HTML and dynamic content.
CSS can be difficult to maintain on large projects. Stylus helps ease the maintenance.
Bootstrap provides clean styles and helper functions, and is easily incorporated into your Express project.
ExpressJS includes support for serving the static files that your project needs.
Some people prefer other options besides Jade and Stylus. Many template options are available.
Most ExpressJS applications are built from many modules. Planning ahead can help us decide which ones are most helpful.
Once we’ve decided on a set of modules, we’ll need to install them.
Due to our planning, we know the URLs we’ll need for our site. We can create them now to make early testing easier.
One of the most visible components of our application is the interface. We’ll build the interface so that we can click through the site.
Following the ‘separation of concerns’ pattern, we should ensure that we don’t put the app logic into our templates.
We have static HTML/Jade, and we want to inject dynamic data.
Developers often face anxiety when it’s time to publish their code because they don’t know if something will break. Automated testing gives peace of mind.
We have many tools available for us. We’ll learn why full-stack testing is good at times, and why micro-testing or unit-testing is a better choice at other times.
There are so many tools and choices, which can make it difficult to get your project set up with a working configuration. We’ll use Karma, Mocha, and Chai to test our project.
Client-side code can be tested too, but the tools are slightly different since client-side code depends on a browser and its DOM.
Developing applications that use MongoDB will be much easier if we have a database to test it with.
One of the best tools to utilize MongoDB in ExpressJS is the Mongoose library.
MongooseJS provides an easy and powerful way to easily interact with our data in MongoDB.
Once we understand how MongoDB differs from relational databases, we’ll be able to know when to use each.
We’ll convert our application from storing data in memory to storing it in MongoDB using MongooseJS.
PassportJS is an authentication framework that simplifies adding login capabilities to our app.
By default, web servers don’t remember anything about us from one page view to the next. Sessions help us to remember between page views.
We can simplify the registration and login process by using social media providers.
You have several options when deploying your application. Here are some things to consider as you make the decision.
Cloud hosting provides easy scalability and low initial costs.
A dedicated server gives you more control and flexibility but also more responsibilities.
We can make our application cleaner and more maintainable by extracting duplicated code to a separate module.
We can speed up the process of building RESTful applications using SailsJS.
How to run the popular blogging tool Ghost locally, and view the source code.
How to integrate client-side MVC apps such as BackboneJS and Angular with ExpressJS
How to integrate Socket.io into your application.
Summary of what we’ve learned in this series.
Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.
With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.
From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.
Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.