pra
publish-react-app
npm i publish-react-app
pra

publish-react-app

Tool for publishing a react app publicly via S3

by FenrisWulf

1.0.1 (see all)License:MITTypeScript:Not Found
npm i publish-react-app
Readme

publish-react-app

Tool for automatically publishing a react app to the internet via S3

Exampe usage

npm install -g create-react-app publish-react-app
create-react-app myapp
cd myapp/
npm run build
AWS_ACCESS_KEY_ID={Your AWS key ID here} AWS_SECRET_ACCESS_KEY={Your AWS secret here} publish-react-app
# Your website is now available: [your url will be here]

What it does

So you've created a React app. Now you want to get it off of localhost and put it on the real internet. But you don't want to think about how cloud hosting works. You just want to run a command. This tool does just that. Given a users AWS credentials, this tool will upload all of the contents generated by a project started by create-react-app and get a sharable link to the final product. Since S3 is free for the first year, and then cheap after that, it is an ideal way to share your React apps.

In short, this package will take the contents of your ./build folder and upload them to S3. The package will create bucket in your account. You will be given a randomly generated URL of where the S3 bucket is.

What are AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY?

If you do not have your own AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY here is how you can get one:

  1. Create an account by signing up to https://aws.amazon.com/
  2. Add a user by going to https://console.aws.amazon.com/iam/home?#/users$new?step=details
    • Select Programmatic access as Access Type
    • Hit the Next: Permissions button
    • Hit Create group
    • Make group name something like "Admin" and select AdministratorAccess as the policy name
    • Hit the Create policy button.
    • Hit the Next: Review button
    • Hit the Create user
  3. At the final screen, the Access key ID and Secret access key strings will be visible.

Downloads/wk

4

GitHub Stars

14

LAST COMMIT

4yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
1.0.1
latest
4yrs ago
No alternatives found
No tutorials found
Add a tutorial