Skip to content

Instantly share code, notes, and snippets.

@mjmaix
Created October 28, 2018 15:11
Show Gist options
  • Save mjmaix/73ae2923ca6ecc03505a8bfdb45d1fba to your computer and use it in GitHub Desktop.
Save mjmaix/73ae2923ca6ecc03505a8bfdb45d1fba to your computer and use it in GitHub Desktop.
console logs and commands for ReactXP and Aws Amplify setup
MJA-MBP:sample-app mick$ amplify init
Note: It is recommended to run this command from the root of your app directory
? Choose your default editor: (Use arrow keys)
? Choose your default editor: Visual Studio Code
? Choose the type of app that you're building javascript
Please tell us about your project
? What javascript framework are you using none
? Source Directory Path: src
? Distribution Directory Path: dist-web
? Build Command: npm run build:web
? Start Command: npm run start:rn-dev-server
Using default provider awscloudformation
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
? Do you want to use an AWS profile? Yes
? Please choose the profile you want to use projects-sample-app
⠴ Initializing project in the cloud...
CREATE_IN_PROGRESS sampleapp-20181028224453 AWS::CloudFormation::Stack Sun Oct 28 2018 22:44:54 GMT+0800 (PST) User Initiated
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Sun Oct 28 2018 22:44:57 GMT+0800 (PST)
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Sun Oct 28 2018 22:44:57 GMT+0800 (PST)
CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Sun Oct 28 2018 22:44:58 GMT+0800 (PST)
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Sun Oct 28 2018 22:44:58 GMT+0800 (PST) Resource creation Initiated
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Sun Oct 28 2018 22:44:58 GMT+0800 (PST) Resource creation Initiated
CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Sun Oct 28 2018 22:45:00 GMT+0800 (PST) Resource creation Initiated
⠙ Initializing project in the cloud...
CREATE_COMPLETE UnauthRole AWS::IAM::Role Sun Oct 28 2018 22:45:17 GMT+0800 (PST)
CREATE_COMPLETE AuthRole AWS::IAM::Role Sun Oct 28 2018 22:45:18 GMT+0800 (PST)
CREATE_COMPLETE DeploymentBucket AWS::S3::Bucket Sun Oct 28 2018 22:45:21 GMT+0800 (PST)
CREATE_COMPLETE sampleapp-20181028224453 AWS::CloudFormation::Stack Sun Oct 28 2018 22:45:23 GMT+0800 (PST)
✔ Successfully created initial AWS cloud resources for deployments.
Your project has been successfully initialized and connected to the cloud!
Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify <category> add" will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud
Pro tip:
Try "amplify add api" to create a backend API and then "amplify publish" to deploy everything
MJA-MBP:sample-app mick$ amplify add hosting
? Select the environment setup: (Use arrow keys)
? Select the environment setup: DEV (S3 only with HTTP)
? hosting bucket name sampleapp-20181028224651--hostingbucket
? index doc for the website index.html
? error doc for the website index.html
You can now publish your app using the following command:
Command: amplify publish
MJA-MBP:sample-app mick$ amplify publish
(node:57995) ExperimentalWarning: The fs.promises API is experimental
| Category | Resource name | Operation | Provider plugin |
| -------- | --------------- | --------- | ----------------- |
| Hosting | S3AndCloudFront | Create | awscloudformation |
? Are you sure you want to continue? true
⠸ Updating resources in the cloud. This may take a few minutes...
UPDATE_IN_PROGRESS sampleapp-20181028224453 AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:17 GMT+0800 (PST) User Initiated
CREATE_IN_PROGRESS hostingS3AndCloudFront AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:22 GMT+0800 (PST)
CREATE_IN_PROGRESS hostingS3AndCloudFront AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:24 GMT+0800 (PST) Resource creation Initiated
⠇ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS sampleapp-20181028224453-hostingS3AndCloudFront-1T3JMKBGR622Y AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:24 GMT+0800 (PST) User Initiated
CREATE_IN_PROGRESS S3Bucket AWS::S3::Bucket Sun Oct 28 2018 22:47:27 GMT+0800 (PST)
⠧ Updating resources in the cloud. This may take a few minutes...
CREATE_IN_PROGRESS S3Bucket AWS::S3::Bucket Sun Oct 28 2018 22:47:29 GMT+0800 (PST) Resource creation Initiated
⠧ Updating resources in the cloud. This may take a few minutes...
CREATE_COMPLETE S3Bucket AWS::S3::Bucket Sun Oct 28 2018 22:47:50 GMT+0800 (PST)
CREATE_IN_PROGRESS BucketPolicy AWS::S3::BucketPolicy Sun Oct 28 2018 22:47:52 GMT+0800 (PST)
CREATE_IN_PROGRESS BucketPolicy AWS::S3::BucketPolicy Sun Oct 28 2018 22:47:54 GMT+0800 (PST) Resource creation Initiated
CREATE_COMPLETE BucketPolicy AWS::S3::BucketPolicy Sun Oct 28 2018 22:47:54 GMT+0800 (PST)
CREATE_COMPLETE sampleapp-20181028224453-hostingS3AndCloudFront-1T3JMKBGR622Y AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:56 GMT+0800 (PST)
CREATE_COMPLETE hostingS3AndCloudFront AWS::CloudFormation::Stack Sun Oct 28 2018 22:47:58 GMT+0800 (PST)
⠧ Updating resources in the cloud. This may take a few minutes...
UPDATE_COMPLETE_CLEANUP_IN_PROGRESS sampleapp-20181028224453 AWS::CloudFormation::Stack Sun Oct 28 2018 22:48:03 GMT+0800 (PST)
UPDATE_COMPLETE sampleapp-20181028224453 AWS::CloudFormation::Stack Sun Oct 28 2018 22:48:04 GMT+0800 (PST)
✔ All resources are updated in the cloud
Hosting endpoint: http://sampleapp-20181028224651--hostingbucket.s3-website-ap-southeast-1.amazonaws.com
> sampleapp@0.0.1 build:web /Users/mick/Codes/git/projects/sample-app
> cross-env platform=web webpack --config=web/webpack/prod.js --progress --colors --mode=production
Starting type checking and linting service...
Using 1 worker with 2048MB memory limit
Hash: 21435da69c9801315a54
Version: webpack 4.23.0
Time: 4582ms
Built at: 10/28/2018 10:48:27 PM
Asset Size Chunks Chunk Names
bundle.js 376 KiB 0 [emitted] [big] main
index.html 506 bytes [emitted]
Entrypoint main [big] = bundle.js
[21] (webpack)/buildin/global.js 489 bytes {0} [built]
[54] (webpack)/buildin/module.js 497 bytes {0} [built]
[146] ./src/index.tsx 514 bytes {0} [built]
[333] ./src/App.tsx 3.28 KiB {0} [built]
[342] ./src/config.ts 160 bytes {0} [built]
+ 338 hidden modules
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
bundle.js (376 KiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (376 KiB)
bundle.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./web/template.html 668 bytes {0} [built]
[2] (webpack)/buildin/global.js 489 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
frontend build command exited with code 0
✔ Uploading files successful.
Your app is published successfully.
http://sampleapp-20181028224651--hostingbucket.s3-website-ap-southeast-1.amazonaws.com
MJA-MBP:sample-app mick$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment