Skip to Content
全栈Serverless
book

全栈Serverless

by Nader Dabit
March 2022
Intermediate to advanced
205 pages
3h 9m
Chinese
China Electric Power Press Ltd.
Content preview from 全栈Serverless
114
|
第
7
章
7.1
主要构建目标
我们将构建一个基本的电子商务应用程序,它将允许用户查看产品,并且允
许管理员创建和删除产品。该应用程序的构建代码块将为几乎任何
CRUD+L
(创建,读取,更新,删除和显示列表)的应用程序奠定基础,这也是许多
实际项目的基础。
我们将使用在第二章和第
6
章中学到的知识,并在本章对它们进行整合。
我们需要的服务和特性如下所示:
Lambda
函数
主要的应用程序逻辑将驻留在
Lambda
函数中,该函数将运行
Express
服务器。该服务器将具有我们需要用到的路由对应的不同
HTTP
方法:
GET
,
POST
和
DELETE
。
API
为了和主要的
Lambda
函数进行交互,我们将需要能够使用
HTTP
请求调
用它,从而发送
GET
,
POST
和
DELETE
请求以与
API
和数据库进行交互。
NoSQL
数据库
DynamoDB
该数据库将保存应用程序的所有数据。
身份验证
我们将需要一种验证用户身份的方法,以便配置和启用管理员访问权限。
其他的
Lambda
函数
我们将需要一个
Lambda
触发器来将管理员添加到
Admin
组中,因此将有
另一个与身份验证流程相关联的
Lambda
函数(后确认触发器)。
如前所述,我们需要将导航功能集成到客户端应用程序中以实现路由之间的
链接。当用户登录后,我们将访问用户所在的组,以根据用户的权限确定应
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham
流架构

流架构

James Urquhart

Publisher Resources

ISBN: 9787519864453