@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: {
region: Stack.of(this).region,
identityPoolId: userIdentity.identityPool.identityPoolId,
userPoolId: userIdentity.userPool?.userPoolId,
userPoolWebClientId: userIdentity.userPoolClient?.userPoolClientId,
}
},
});
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
File details
Details for the file aws_prototyping_sdk.awsui_react_ts_website-0.3.12.tar.gz
.
File metadata
- Download URL: aws_prototyping_sdk.awsui_react_ts_website-0.3.12.tar.gz
- Upload date:
- Size: 75.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb271d34dbb60645f2db3b0798ef390f4ee62d2d77240c7b00303ef5e03ae883 |
|
MD5 | 5a70f8b9f1dfd7ce25aecfa874039945 |
|
BLAKE2b-256 | 2ec24695d667b5d60bc30b277331a3db97da5ed03a8971484dc9ca41c23f1b76 |
Provenance
File details
Details for the file aws_prototyping_sdk.awsui_react_ts_website-0.3.12-py3-none-any.whl
.
File metadata
- Download URL: aws_prototyping_sdk.awsui_react_ts_website-0.3.12-py3-none-any.whl
- Upload date:
- Size: 74.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc52ae140dadccadd83b8d77082d447ea19a319ea5ebbfec056d4526a9cfaaf7 |
|
MD5 | 6424351908e4f2e21c92bade07a8ecb5 |
|
BLAKE2b-256 | 5eaff207f99189a358c2b5628ca8e748f7543bc630938439c1e87c1d34829e6d |