Category: Youtube
Created time: October 28, 2022 3:24 AM
Source: Rocketseat
Tags: Serverless, Upstash, Wangler, Workers
Source Rocketseat
Unlike the traditional cloud, edge computing makes the user activate the closest server during their access.
Deploy serverless
Cloudflare Workers®
Serverless Database Platform
Upstash: Serverless Data for Redis® and Kafka®
Runtime APIs · Cloudflare Workers docs
*As global
npm i -g wrangler
Start a new project
wrangler init project_name
Running
# running on cloud [Localhost is just a proxy]
npm run start
# runnig ONLY localhost [without cloud]
npm run local
# Publish project
npm run deploy
"scripts": {
"start": "wrangler dev",
"local": "wrangler dev --local", //added [it's NOT default]
"deploy": "wrangler publish"
}
- First create a account e a new database as global
- REST API infos:
@Upstash/redis
UPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN
npm install @upstash/redis
npm install worktop
npm run deploy
wrangler secret put UPSTASH_REDIS_REST_TOKEN
Announcing D1: first SQL database by Cloudflare
PlanetScale | The MySQL-compatible serverless database platform
The edge cloud platform behind the best of the web
Develop. Preview. Ship. For the best frontend teams - Vercel