Skip to Content
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
book

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
10 사용자에게 푸시 알림 보내기
- 305
용합니다
(
이 파일을 생성하는 방법에 대한 세부 내용은
288
페이지의 ‘공개
VAPID
키, 비공개
VAPID
키 생성하기’에서 다루고 있습니다
)
.
전송받는 메시지를 문자열로 변환하기 위해
JSON
.
stringify()
를 사용하는 부
분도 있습니다. 이전 예제 코드에서 볼 수 있듯이 객체를 메시지로 전달할 수 있습
니다.
마지막으로 구독 세부정보 객체를 데이터베이스에서 가져와
forEach()
문으로
루프를 돌며, 모든 구독자에게 메시지를 전송합니다. 일반적인 경우, 한 번에 한
명의 구독자에게만 메시지를 전송히거나 각 사용자를 위한 각각의 메시지 내용을
커스터마이징할 가능성이 큽니다. 코드를 단순하게 유지하기 위해, 기초적인 상태
인 우리 서버는 사용자를 한 명만 지원하기 때문에 모든 예약 확정 알림은 모든 구
독자에게 전송됩니다.
이 장에서는 서버사이드 코드에 대해 살펴봅니다. 핵심 개념이 잘 드러날 수 있도
록 최대한 코드를 간단히 유지했습니다. 푸시 메시지 전송을 처리하기 위해
Node
.
js
web
-
push
라이브러리
(https
://
pwabook
.
com
/
webpushnodejs
)
를 사용했
습니다. 다른 프로그래밍 언어에서도 비슷한 라이브러리
(https
://
pwabook
.
com
/
webpushlibs
)
를 찾을 수 ...
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

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

한선용, 라이언 미첼

Publisher Resources

ISBN: 9791162248737