Skip to content

Latest commit

 

History

History

simple

English / 日本語

Simple Example

A simple Qwik app served via an HTTP API on Amazon API Gateway.

You can learn:

  • how to use the QwikHandler construct
  • how to integrate a Qwik app into an HTTP API

Getting started

Prerequisites

Please finish the configurations described in the Section "Common configurations" in the examples folder.

Resolving dependencies

npm install

Synthesizing a CloudFormation template

I want to check what CloudFormation template is generated before deploying it.

npx cdk synth -c "@aws-cdk/core:bootstrapQualifier=$TOOLKIT_STACK_QUALIFIER"

Deploying the CDK stack

npx cdk deploy --toolkit-stack-name $TOOLKIT_STACK_NAME -c "@aws-cdk/core:bootstrapQualifier=$TOOLKIT_STACK_QUALIFIER"

You will find a CDK stack qwik-bundle-example-simple deployed.

Accessing the deployed app

The CDK stack outputs the URL of the deployed HTTP API as HttpApiUrl. You can retrieve it with the following command:

aws cloudformation describe-stacks --stack-name qwik-bundle-example-simple --query "Stacks[0].Outputs[?OutputKey=='HttpApiUrl'].OutputValue" --output text