Your First Week With Node.js

 
 
SitePoint (Verlag)
  • 2. Auflage
  • |
  • erschienen am 24. April 2020
  • |
  • 192 Seiten
 
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-0981-2282-9 (ISBN)
 
While there have been quite a few attempts to get JavaScript working as a server-side language, Node.js (frequently just called Node) has been the first environment that's gained any traction. It's now used by companies such as Netflix, Uber and Paypal to power their web apps. Node allows for blazingly fast performance; thanks to its event loop model, common tasks like network connection and database I/O can be executed very quickly indeed.From a beginner's point of view, one of Node's obvious advantages is that it uses JavaScript, a ubiquitous language that many developers are comfortable with. If you can write JavaScript for the client-side, writing server-side applications with Node should not be too much of a stretch for you.This book offers aselection of beginner-level tutorials to privide you with an introduction to Node and its related technologies, and get you under way writing your first Node applications. It contains:What Is Node and When Should I Use It?Build a Simple Page Counter Service with Node.jsUnderstanding module.exports and exports in Node.jsForms, File Uploads and Security with Node.js and ExpressWorking with Databases in NodeHow to Build and Structure a Node.js MVC ApplicationLocal Authentication Using Passport in Node.jsHow to Debug a Node AppNode Testing for BeginnersHow to Use SSL/TLS with Node.jsConfiguring NGINX and SSL with Node.jsUsing Docker for Node.js Development
  • Englisch
  • Sebastopol
  • |
  • USA
  • 0,52 MB
978-1-0981-2282-9 (9781098122829)
weitere Ausgaben werden ermittelt
  • Your First Week With Node.js, 2nd Edition
  • Notice of Rights
  • Notice of Liability
  • Trademark Notice
  • About SitePoint
  • About Craig Buckler
  • Preface
  • Who Should Read This Book?
  • Conventions Used
  • Code Samples
  • Tips, Notes, and Warnings
  • Supplementary Materials
  • Chapter 1: What Is Node and When Should I Use It?
  • by James Hibbard
  • What Is Node.js?
  • Node Is Built on Google Chrome's V8 JavaScript Engine
  • How Do I Install Node.js?
  • Node Binaries vs Version Manager
  • "Hello, World!" the Node.js Way
  • Node.js Has Excellent Support for Modern JavaScript
  • Introducing npm, the JavaScript Package Manager
  • Installing a Package Globally
  • Installing a Package Locally
  • Working with the package.json File
  • What Is Node.js Used For?
  • Node.js Lets Us Run JavaScript on the Server
  • The Node.js Execution Model
  • Are There Any Downsides?
  • "Hello, World!"-Server Version
  • What Kind of Apps Is Node.js Suited To?
  • What Are the Advantages of Node.js?
  • Other Uses of Node
  • Conclusion
  • Chapter 2: Build a Simple Page Counter Service with Node.js
  • by Craig Buckler
  • Prerequisites
  • Project Overview
  • Page Hit v1.0: In-memory Storage
  • Step 0 (optional): Source Control
  • Step 1: Initialization
  • Step 2: Main File (index.js)
  • Step 3: Additional Modules
  • Step 4: Test Page
  • Page Hit v2.0: File Storage
  • Node.js File System API
  • Step 1: File Utilities
  • Step 2: Modify lib/pagehit.js
  • Step 3: Test
  • Job Done?
  • Chapter 3: Understanding module.exports and exports in Node.js
  • by James Hibbard
  • Different Module Formats
  • Requiring a Module
  • Creating and Exporting a Module
  • Exporting Multiple Methods and Values
  • Variations in Syntax
  • Exporting a Default Value
  • What's the Difference Between module.exports and exports?
  • So Which One Should I use?
  • Conclusion
  • Chapter 4: Forms, File Uploads and Security with Node.js and Express
  • by Mark Brown and James Hibbard
  • Setup
  • Displaying the Form
  • Form Submission
  • Validation and Sanitization
  • Validation
  • Sanitization
  • The Valid Form
  • Sending Email with Node
  • Security considerations
  • TLS over HTTPS
  • Wear Your Helmet
  • Cross-site Request Forgery (CSRF)
  • Cross-site Scripting (XSS)
  • File Uploads
  • Populating File Inputs
  • Uploading Files with Node
  • Thanks for Reading
  • Chapter 5: Working with Databases in Node
  • by Craig Buckler
  • Evaluate CMS Templates and Plugins
  • Reduce Client-side Code
  • Optimize JavaScript Code
  • Use JavaScript Sparingly
  • Avoid Long-running Tasks
  • Bind Events Sparingly
  • Analyze Modified Code
  • Modify the DOM Effectively
  • Cache Regularly Used Nodes
  • Minimize Reflows
  • Batch-update Styles
  • Batch-update Elements
  • Use requestAnimationFrame
  • Consider Progressive Rendering
  • Use Server-side Rendering
  • Do You Need a JavaScript or CSS Framework?
  • Use a Static Site Generator
  • Use a Build System
  • Use Progressive Enhancement
  • Adopt a Performance Budget
  • Create a Style Guide
  • Simplify and Streamline
  • Learn to Love the Web
  • Chapter 6: How to Build and Structure a Node.js MVC Application
  • by Nilson Jacques and James Kolce
  • What is MVC?
  • Laying out the Foundation
  • Storing Our Settings
  • Defining the Routes
  • Building the Models
  • Setting up the Database
  • Creating Our Note Model
  • Synchronizing the Database
  • Building the Controllers
  • The Home Controller
  • Boilerplate of the Note Controller
  • The create Function
  • The read Function
  • The update Function
  • The delete Function
  • Using the Note Controller in Our Routes
  • Building the Views
  • The Note Component
  • The Base Layout
  • The Home View
  • The Note View
  • The JavaScript on the Client
  • Adding Support for Views on the Server
  • Setting the Home View
  • Setting the Note View: create Function
  • Setting the Note View: read Function
  • Setting the Note View: update Function
  • Serving Static Files
  • Conclusion
  • Chapter 7: Local Authentication Using Passport in Node.js
  • by Paul Orac
  • 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
  • Chapter 8: How to Debug a Node App
  • by Craig Buckler
  • What is Debugging?
  • Terminology
  • How to Avoid Bugs
  • Use a Good Code Editor
  • Use a Code Linter
  • Use Source Control
  • Adopt an Issue-tracking System
  • Use Test-driven Development
  • Step Away
  • 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
  • Advanced Debugging Configuration
  • Other Node.js Debugging Tools
  • Get Debugging!
  • Chapter 9: Node Testing for Beginners
  • by M. David Green
  • What Testing Is
  • Basic Assertion Testing Built In
  • The Existential Assertion
  • Asserting Equality
  • Testing Edge Cases
  • Structuring Your Tests
  • Test Cases
  • Test Suites
  • Test Harnesses
  • Fixtures
  • Test Doubles
  • Frameworks for Automated Testing
  • Jasmine is the Oldest
  • Jest is the Most Popular
  • Mocha/Chai is the Most Comprehensive
  • Cypress is the Newest
  • Get Started Now
  • Chapter 10: How to Use SSL/TLS with Node.js
  • by Florian Rappl and Almir Bijedic
  • HTTPS Everywhere
  • Basic Communication
  • HTTPS
  • Generating Certificates
  • Certbot
  • Tighetning It Up
  • HTTP Strict Transport Security
  • Diffie-Hellman Strong(er) Parameters
  • Conclusion
  • Chapter 11: Configuring NGINX and SSL with Node.js
  • by Nilson Jacques
  • Installing NGINX
  • Installation on Linux
  • Installation on macOS
  • Installation on Windows
  • Setting Up a Node.js Server
  • Configuring NGINX
  • Setting Up SSL
  • Bonus: Serving Static Assets
  • Conclusion
  • Chapter 12: Using Docker for Node.js Development
  • by Craig Buckler
  • "But it Works on My Machine!"
  • Virtual Machines
  • Docker Overview
  • Docker Concepts and Terminology
  • Images
  • Containers
  • Volumes
  • Networks
  • Docker Compose
  • Development and Production Environments
  • How to Install Docker
  • Permission Errors
  • 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

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

12,99 €
inkl. 5% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen