본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)8.1k · #12614

webiny-local-development

하는 일

Webiny 프로젝트를 AWS에 배포하고, API나 관리자 앱을 내 컴퓨터에서 실행하며, 환경을 나누어 관리하는 방법을 설명합니다. Webiny 프로젝트를 만들고 테스트하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓프로젝트 전체나 한 부분만 배포하는 방법을 물을 때.
  • ✓개발 서버로 관리자 앱을 로컬에서 실행하고 싶을 때.
  • ✓개발 중에 API나 관리자 앱을 디버깅해야 하는 경우.

스킬 링크

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/local-development/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/local-development/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“변경 사항을 테스트하려면 내 컴퓨터에서 Webiny 관리자 앱을 시작하는 명령이 무엇인가요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 배포 명령과, 작업하는 동안 앱을 로컬에서 실행하는 감시 모드 명령을 설명합니다. 개발이나 운영 같은 올바른 환경을 고르는 방법도 다룹니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Local Development and Deployment

TL;DR

Webiny is a serverless platform on AWS. Deploy with yarn webiny deploy, develop locally with yarn webiny watch (API uses Local Lambda Development, Admin runs a local React dev server). Projects support multiple environments (long-lived and short-lived). Always redeploy after stopping watch mode.

Deployment

Initial Deployment

Deploy all three applications (Core, API, Admin) at once:

yarn webiny deploy

This deploys to the dev environment by default. First deployment takes 5-15 minutes.

Deploying Individual Applications

yarn webiny deploy core        # Infrastructure only
yarn webiny deploy api         # Backend API only
yarn webiny deploy admin       # Admin frontend only

Deploy to a Specific Environment

yarn webiny deploy --env prod
yarn webiny deploy api --env staging

Get Deployment Info

yarn webiny info              # Shows all URLs (Admin, API, CloudFront)
yarn webiny info --env prod   # Info for a specific environment

Local Development

Before developing locally, you must deploy Core and API first:

yarn webiny deploy core api

Admin Development

yarn webiny watch admin
  • Starts a local dev server at http://localhost:3001
  • Hot module replacement for instant feedback
  • Standard React development experience
  • Use for: custom Admin UI extensions, white-label branding, custom views

API Development (Local Lambda Development)

yarn webiny watch api

How it works:

  1. Lambda stubs deployed -- real Lambda functions are replaced with stubs that forward events
  2. Events forwarded -- requests to AWS get forwarded to your local machine
  3. Local execution -- your code runs locally with full AWS Lambda environment
  4. Response routing -- responses sent back through the Lambda stub

Benefits:

  • See backend code changes instantly (no redeployment)
  • Debug locally with standard Node.js tools
  • Console logs appear directly in your terminal

IMPORTANT: Redeploy After Watch

When you stop yarn webiny watch api, your Lambda functions still contain stub code. You must redeploy:

yarn webiny deploy api

The watch command prints a reminder when you stop it.

Running Both

You can run both watch commands simultaneously in separate terminals:

# Terminal 1
yarn webiny watch api

# Terminal 2
yarn webiny watch admin

Environments

Long-Lived Environments

Persistent environments maintained over time:

  • dev -- daily development
  • staging -- pre-production testing
  • prod -- production

Best practice: manage via CI/CD pipelines.

Short-Lived Environments

Temporary environments for specific purposes:

  • Feature branch testing
  • PR previews
  • Experimentation
# Create a short-lived environment
yarn webiny deploy --env feature-123

# Destroy when done
yarn webiny destroy --env feature-123

Deployment Modes

Webiny has two deployment templates:

  • dev -- smaller, cheaper infrastructure for development
  • prod -- production-grade infrastructure with HA, backups, auto-scaling

The mode is determined by whether the environment name is in the ProductionEnvironments list:

// webiny.config.tsx
<Infra.ProductionEnvironments environments={["prod", "staging"]} />

State Files

State files are JSON files that track the current state of your deployment:

  • Store infrastructure resource info, configurations, and metadata
  • Essential for managing environments and tracking changes
  • Stored in S3 by default

Debugging

API Errors

During yarn webiny watch api:

  • Console logs appear directly in the terminal
  • Use console.log() for quick debugging
  • Use Logger (DI-injected) for production logging to CloudWatch
import { Logger } from "webiny/api";

// In your extension class
this.logger.info("Processing request...");
this.logger.warn("Something unexpected");
this.logger.error("Something failed");

Admin Errors

Use browser DevTools:

  • Console -- view logs and errors
  • Network tab -- inspect GraphQL requests/responses
  • React Developer Tools -- debug component state/props
  • GraphQL Network Inspector -- inspect GraphQL operations

Infrastructure Errors

Deployment errors from Pulumi typically relate to:

  • IAM permission issues
  • AWS service quotas
  • Resource configuration problems

Check the deployment output

자주 묻는 질문

배포는 기본적으로 어떤 환경을 쓰나요?

environment 옵션으로 다른 환경을 지정하지 않으면 dev 환경을 씁니다.

로컬에서 실행하기 전에 배포해야 하나요?

네. 로컬 개발을 하기 전에 코어와 API 부분을 먼저 배포하라고 스킬이 설명합니다.

감시 모드를 끈 뒤에 다시 배포해야 하나요?

네. 감시 모드를 멈춘 뒤에는 다시 배포하라고 조언합니다.

상세 정보

작성자의 원본 설명

Deploying, developing locally, managing environments, and debugging Webiny projects. Use this skill when the developer asks about deployment commands (deploy, destroy, info), local development with watch mode (API or Admin), the Local Lambda Development system, environment management (long-lived vs short-lived, production vs dev modes), build parameters, state files, debugging API/Admin/Infrastructure errors, or the redeploy-after-watch requirement.

repo: webiny/webiny-js

인기도

GitHub 스타
8.1k
순위
#12614
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬