SitePoint
  • Premium
  • Library
  • Community
  • Jobs
  • Blog
LoginStart Free Trial
Your First Week With Node.js, 2nd Edition
Your First Week With Node.js, 2nd Edition
Notice of Rights
Notice of Liability
Trademark Notice
About SitePoint
Who Should Read This Book?
Conventions Used
What Is Node.js?
How Do I Install Node.js?
Introducing npm, the JavaScript Package Manager
What Is Node.js Used For?
Node.js Lets Us Run JavaScript on the Server
What Kind of Apps Is Node.js Suited To?
What Are the Advantages of Node.js?
Other Uses of Node
Conclusion
Prerequisites
Project Overview
Page Hit v1.0: In-memory Storage
Page Hit v2.0: File Storage
Job Done?
Different Module Formats
Requiring a Module
Creating and Exporting a Module
Exporting a Default Value
What’s the Difference Between module.exports and exports ?
Conclusion
Setup
Displaying the Form
Form Submission
Validation and Sanitization
The Valid Form
Security considerations
File Uploads
Thanks for Reading
What is a Database?
Prerequisites
The Core Node.js Application
MongoDB Version
MySQL Version
Sequelize ORM Version
Next Steps
What is MVC?
Laying out the Foundation
Storing Our Settings
Defining the Routes
Building the Models
Building the Controllers
Building the Views
Serving Static Files
Conclusion
Prerequisites
Authentication Strategies: Session vs JWT
Creating the Project
Setting up Express
Setting up Passport
Creating a MongoDB Data Store
Connecting Mongo to Node with Mongoose
Implementing Local Authentication
Routes
The Client
Next Steps
Conclusion
What is Debugging?
How to Avoid Bugs
Node.js Debugging: Environment Variables
Node.js Debugging: Command Line Options
Console Debugging
Node.js util.debuglog
Debugging with Log Modules
Node.js V8 Inspector
Node.js Debugging with Chrome
Node.js Debugging with VS Code
Other Node.js Debugging Tools
Get Debugging!
What Testing Is
Basic Assertion Testing Built In
Structuring Your Tests
Frameworks for Automated Testing
Get Started Now
HTTPS Everywhere
Basic Communication
HTTPS
Generating Certificates
Tighetning It Up
Conclusion
Installing NGINX
Setting Up a Node.js Server
Configuring NGINX
Setting Up SSL
Bonus: Serving Static Assets
Conclusion
“But it Works on My Machine!”
Virtual Machines
Docker Overview
Docker Concepts and Terminology
How to Launch a Database Container
How to Launch a Node.js Container
Using Docker Compose During Development
Using Docker Compose in Production
Cleaning Up
Next Steps

Community Questions