第八屆 優選

web
30 天打造 MERN Stack Boilerplate
gocreating

系列文章

DAY 11

Day 11 - Infrastructure - Introduction

總算來到 Infrastructure 的部份了,前面用了 10 篇,也正好是 1/3 的篇幅,講解一些 General 的概念及架構,現在我要再用另外 1/3...

DAY 12

Day 12 - Infrastructure - Isomorphic API

這裡所謂的 API 指的是 Client 向 Server 的某一個 Path 發出 Request,比如說: POST /todos GET /tod...

DAY 13

Day 13 - Infrastructure - Error Handling

Isomorphic 錯誤處理 前後端可能發生的錯誤有千百種,為了方便維護,還有統一管理,我決定在 Isomorphic 的 Flux Store 中掛上 er...

DAY 14

Day 14 - Infrastructure - Isomorphic Routing

為了實現 Isomorphic,我們的 Boilerplate 採用了 React-Router 來控制頁面的路由,另外還搭配了 react-router-re...

DAY 15

Day 15 - Infrastructure - Form

表單是網頁中非常重要的元素,但同時也非常複雜,複雜之處在於,對每一個表單欄位而言,都可能有屬於自己的資料驗證流程、驗證錯誤處理、可能會需要呼叫 API、可能需要...

DAY 16

Day 16 - Infrastructure - Authentication

Passport Authentication 是許多 Web 服務都會使用到的基本功能,但每個服務的需求可能又不太一樣,有的人只需要 Basic Auth,有...

DAY 17

Day 17 - Infrastructure - Permission Control

API Server 通常需要做到 2 種權限控制,第一是檢查使用者是否已經登入(Authentication),另一種是對已登入的使用者檢查是否具有足夠權限(...

DAY 18

Day 18 - Infrastructure - i18n

講到 i18n 真的就是只有機掰兩個字可以形容,因為它實在是一個非常破壞程式整體結構的東西,雖然可以搭配現有 Library 讓程式稍微容易維護一點,但是,如何...

DAY 19

Day 19 - Infrastructure - Pagination

試想今天你要提供一個 API GET /api/users 來列出 Server 上的所有 User,你會怎麼做?以交作業的心態,能動就好,挖靠哩,總共 5 行...

DAY 20

Day 20 - Infrastructure - Mail Service

無論是驗證信箱、重設密碼、寄送電子報、更新服務條款、...,即使再小的 Real World App 都必須要考量到寄信服務。如果自己架 Mail Server...