Skip to content

dbartholomae/jsx-cdk

Repository files navigation

jsx-cdk

npm version downloads open issues build status codecov dependency status devDependency status

This is a proof-of-concept, not a production-ready solution.

Generate AWS CDK infrastructure with a React-like syntax.

Usage

/* @jsx h */
import h, { attachToApp, Stack, Queue } from "jsx-cdk";
import { App, Duration, StackProps } from "aws-cdk-lib";

const CdkExampleStack = (props: StackProps) => {
  return (
    <Stack {...props}>
      <Queue key="CdkExampleQueue" visibilityTimeout={Duration.seconds(300)} />
    </Stack>
  );
};

void attachToApp(
  <CdkExampleStack
    env={{ account: "111111111", region: "eu-central-1" }}
    key="CdkExampleStack"
  />,
  new App()
);

Documentation

There's a documentation of all elements you can use.

About

Experiments around writing CDK in JSX

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published