- Plugins and Extensions
- Using built-in plugins for added functionality.
- Creating custom plugins to extend Hapi.js.
- Understanding Hapi’s extension points for adding functionality to requests, responses, and lifecycle events.
- Validation and Schemas
- Implementing request validation using Joi (a popular validation library).
- Defining and applying schemas for request payloads, query parameters, and headers.
- Authentication and Authorization
- Integrating authentication strategies (basic auth, OAuth, etc.).
- Implementing role-based access control and permissions.
- Error Handling
- Configuring global error handling.
- Customizing error responses and logging.
- Caching
- Configuring caching mechanisms for improved performance.
- Understanding Hapi’s built-in caching options.
- Testing
- Writing unit tests for Hapi.js applications.
- Using testing libraries and tools compatible with Hapi.js.
Category: 04. Hapi Js
https://raw.githubusercontent.com/hapijs/assets/master/images/hapi.png
-
Advanced Features
-
Introduction to Hapi.js
- Overview and Philosophy
- Introduction to Hapi.js: Its history, purpose, and core philosophy.
- Comparison with other frameworks like Express.js, highlighting unique features of Hapi.js.
- Setting Up the Environment
- Installing Node.js and npm (Node Package Manager).
- Setting up a Hapi.js project from scratch.
- Basic structure of a Hapi.js application.
Core Concepts
- Server Creation
- Creating a Hapi server instance.
- Understanding server configurations and options.
- Routing
- Defining routes with various HTTP methods (GET, POST, PUT, DELETE).
- Route handlers: processing requests and sending responses.
- Route parameters and query strings.
- Request and Response Lifecycle
- Understanding the lifecycle of a request.
- Accessing request data (headers, payload, parameters).
- Sending responses and customizing response formats.
- Overview and Philosophy