- Getting Started with hapi.js
- John Brett
- 308字
- 2021-07-09 19:35:56
Chapter 1. Introducing hapi.js
hapi.js (commonly referred to as hapi) stands for HTTP API. It is a rich framework for building applications and services. It was originally designed for the rapid development of RESTful API services using JavaScript, but has since grown to be a full web application framework with out-of-the-box features for templating, input validation, authentication, caching, and more recently, support for real-time applications with web socket support.
The original philosophy that hapi was built around was increasing developer hapi-ness; the aim was to increase productivity by providing additional tools to help with development, but without getting in the way. It was also built with a security-first approach, meaning that the tools provided were developed with smart secure defaults, with the mindset of not giving the developers the ability to shoot themselves in the foot for not knowing some hidden configuration setting or implied design pattern.
hapi was created by the Mobile team at Walmart Labs, led by Eran Hammer (who created OAuth), to handle their traffic for events like Black Friday, one of the busiest days for online shopping in the US calendar.
hapi was born out of necessity; the Walmart team never intended to build a framework. They originally started with express, currently Node's most widely used framework. After hitting some limitations with express, and finding similar limitations in other frameworks, they finally discovered that it would be easier to create their own framework rather than hack an existing framework to meet their needs. Eran wrote a great post about this journey on his blog, http://hueniverse.com/2012/12/20/hapi-a-prologue; I encourage you to read it. Fortunately for us, hapi was born out of all this.
This chapter will be your introduction to hapi.js, and will cover the following topics:
- Introducing Node.js—a prerequisite to learning hapi.js
- A background on hapi.js
- Creating our first hapi.js server
- C語言程序設計(第3版)
- Learning Informatica PowerCenter 10.x(Second Edition)
- FLL+WRO樂高機器人競賽教程:機械、巡線與PID
- 大模型RAG實戰:RAG原理、應用與系統構建
- Learning AngularJS for .NET Developers
- The Professional ScrumMaster’s Handbook
- Hands-On Nuxt.js Web Development
- HoloLens與混合現實開發
- Natural Language Processing with Python Quick Start Guide
- 物聯網系統架構設計與邊緣計算(原書第2版)
- Python深度學習(第2版)
- 像程序員一樣使用MySQL
- 編程改變生活:用Python提升你的能力(基礎篇·微課視頻版)
- Android性能優化之道:從底層原理到一線實踐
- SQL Server 2005數據庫項目教程