hapi

Document hapi.js server lifecycle, routing, authentication, and plugin architecture.

59|4|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/damusix/skills --skill hapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hapi
Source: https://github.com/damusix/skills/tree/main/hapi
Command: npx skills add https://github.com/damusix/skills --skill hapi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for building robust and scalable web applications using the hapi.js framework, covering everything from basic server setup to advanced authentication and plugin development.

Core Features & Use Cases

  • Server Configuration: Learn how to set up ports, hosts, and core server options.
  • Route Definition: Understand path parameters, method matching, and route options like caching and CORS.
  • Authentication & Authorization: Implement secure authentication schemes, strategies, and access controls.
  • Plugin Development: Structure your application with plugins, manage dependencies, and expose shared functionality.
  • Use Case: A developer starting a new Node.js API project with hapi can use this Skill to quickly understand best practices for structuring routes, implementing JWT authentication, and organizing their codebase into reusable plugins.

Quick Start

Use the hapi skill to learn how to define a basic server route with GET method and a simple handler.

Frequently Asked Questions about hapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a basic web server using hapi.js in Node.js?

To set up a hapi.js web server, you configure core server options like ports and hosts, then define basic routes with methods and handlers to process incoming HTTP requests and return responses.

What is the best way to structure a Node.js API using hapi.js plugins?

The best way to structure a hapi.js API is by using the plugin architecture to organize routes, manage dependencies, and expose shared functionality, ensuring your application remains modular and scalable.

How do I implement JWT authentication in a hapi.js API?

You implement JWT authentication in a hapi.js API by configuring secure authentication schemes and strategies, applying access controls to specific routes to validate user identity and permissions.

Can I configure caching and CORS directly in my hapi.js route definitions?

Yes, you can configure caching and CORS directly within hapi.js route definitions by utilizing detailed route options to control HTTP response behavior and cross-origin resource sharing policies.

What are the security best practices for handling requests and responses in hapi.js?

Security best practices for hapi.js request and response handling involve applying access controls, validating payloads, and utilizing built-in server lifecycle hooks to enforce secure API boundaries.