The Definitive Guide to AdonisJs: Building Node.js Applications with JavaScript

Christopher Pitt

  • 出版商: Apress
  • 出版日期: 2018-03-15
  • 定價: $999
  • 售價: 9.0$899
  • 語言: 英文
  • 頁數: 249
  • 裝訂: Paperback
  • ISBN: 1484233891
  • ISBN-13: 9781484233894
  • 相關分類: JavaScriptNode.js
  • 立即出貨 (庫存 < 3)


Learn everything you need to master the AdonisJs framework, including topics such as interacting with a database, rendering templates, writing asynchronous code, and hosting sites with SSL. Along the way, you’ll see how to build a commerce application, which lists products and allows shoppers to register and purchase those products. The site will feature a product catalog, a shopping cart, user registration and login, and profile management.

The Definitive Guide to AdonisJs also covers how to create a front-end build chain, so that you can use a modern front-end framework, such as React. You’ll discover how to connect your front end to the server, so that data and transactions can be shared between the two. Finally, you’ll see how to secure and deploy the application to a virtual private server, including how to apply for and install an SSL certificate and start accepting payments.

After reading and using this book, you’ll know all you need about AdonisJs. You’ll have the tools to turn that side-project you’ve been thinking about into a real money-making product. It is written by a web expert and reviewed by the AdonisJs project lead. This is the complete start-to-finish guide you’ve been waiting for.  

 What You'll Learn

  • Set up Node.js and AdonisJs, so that you can start building your application 
  • Create and use views and template code
  • Implement cooperative multitasking, in JavaScript
  • Represent eventual values with AdonisJs promises
  • Organize and isolate your code in controllers and decorate them with middleware, to do things like authentication
  • Build queries, using the Lucid DSL, and package these database entities up into model classes
  • Validate form data and respond with the appropriate error messages
  • Respond to general framework errors with custom error pages
  • Learn the deeper parts of sessions and cookies
  • Update the state of the user interface with WebSockets
  • Host AdonisJs applications in a modern hosting environment

Who This Book Is For

Readers should have a functional understanding of JavaScript.


學習一切關於 AdonisJs 框架的必要知識,包括與資料庫互動、渲染模板、撰寫非同步程式碼以及使用 SSL 主機託管網站等主題。在學習過程中,您將看到如何建立一個商業應用程式,該應用程式列出產品並允許購物者註冊並購買這些產品。該網站將包含產品目錄、購物車、使用者註冊和登入以及個人資料管理功能。

《AdonisJs 完全指南》還介紹了如何建立前端建置鏈,以便您可以使用現代前端框架,例如 React。您將了解如何將前端連接到伺服器,以便在兩者之間共享資料和交易。最後,您將了解如何將應用程式安全地部署到虛擬私有伺服器,包括如何申請和安裝 SSL 憑證並開始接受付款。

閱讀並使用本書後,您將對 AdonisJs 有全面的了解。您將擁有將一直在思考的副業轉變為真正賺錢產品的工具。本書由網頁專家撰寫,並由 AdonisJs 專案負責人審查。這是您一直等待的從頭到尾的完整指南。

- 設置 Node.js 和 AdonisJs,以便開始建立應用程式
- 建立和使用視圖和模板程式碼
- 在 JavaScript 中實現協作多任務處理
- 使用 AdonisJs promises 代表未來值
- 通過控制器組織和隔離程式碼,並使用中介軟體對其進行裝飾,例如身份驗證
- 使用 Lucid DSL 建立查詢,並將這些資料庫實體封裝成模型類別
- 驗證表單資料並回應適當的錯誤訊息
- 使用自訂錯誤頁面回應一般框架錯誤
- 了解會話和 Cookie 的更深層次
- 使用 WebSockets 更新使用者介面的狀態
- 在現代主機環境中託管 AdonisJs 應用程式

本書適合對 JavaScript 有基本了解的讀者。