@aws-prototyping-sdk/awsui-react-ts-website
Project description
Getting started
To create a new AWS UI React Typescript Project, there are a couple of options:
Via Projen CLI
npx projen new --from @aws-prototyping-sdk/awsui-react-ts-website awsui-react-ts-website [--application-name <your-app>]
Programmatically
new AwsUiReactTsWebsiteProject({
defaultReleaseBranch: "mainline",
name: "<name-of-package>",
applicationName: "<name-of-app>",
});
Running your synthesized Application
To run your synthesized application locally, run npx projen dev
.
Developer Notes
To enable Cognito auth, ensure you have a runtime-config.json file in the root of your deployed project which at least contains the following:
{
"region": "<aws-region>",
"identityPoolId":"<identity-pool-id>",
"userPoolId":"<user-pool-id>",
"userPoolWebClientId":"<user-pool-web-client-id>"
}
The easiest way to get this set up is to use the static-website + identity packages to deploy your website.
An example of how to do this is as follows:
const userIdentity = new UserIdentity(this, 'UserIdentity');
new StaticWebsite(this, 'StaticWebsite', {
websiteContentPath: '<relative>/<path>/<to>/<built>/<website>',
runtimeOptions: {
jsonPayload: RuntimeOptions.fromUserIdentity(this, userIdentity)
},
});
For local development, you will need to copy the generated runtime-config.json file into your /public directory. An example on how to do this is as follows:
curl https://dxxxxxxxxxx.cloudfront.net/runtime-config.json > public/runtime-config.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aws_prototyping_sdk.awsui_react_ts_website-0.2.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91f2fbfa533dbc819486def8d39b45cf068d70f2bff77d397b0810a03cf59fb1 |
|
MD5 | 3a77e77f7ceca05118d797a1d666bb16 |
|
BLAKE2b-256 | 162a2088270093de4dc08f19c7287ed18d91af5343e85cb5f35c1635523a2ea3 |
Hashes for aws_prototyping_sdk.awsui_react_ts_website-0.2.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c48c97d023321ada2f8561e4dc44626f344c75efb40859b03ac7d61aa3f8c81 |
|
MD5 | bb1be9abbe3da5701c9fb36e7808dde3 |
|
BLAKE2b-256 | 3212d8465368ba859895b65f97ed073c1b65d0363ecd00f2833e0ffafacacbf1 |