Skip to content

cloudhnl/slack-invitator-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Honolulu Slack Invitator

This repo consists of an simple html+css+js static website that interacts with an api to send a slack invitation.

To work on the websites and make changes you should install gulp globally using the following command:

npm install -g gulp

You can launch the website on your machine by using the following command:

gulp dev

This will launch a lite server in your machine that will let you browse the website and it will refresh automatically upon file changes.

In order to deploy this website in AWS S3 we should first compile the website (minify the css and js files), and then upload it to an S3 bucket.

  1. [OPTIONAL] Update the SLACK_INVITATOR_API variable in the index.html file to point to your slack invite API.

  2. Compiling: This website comes with gulp already configured to bake the files to upload to S3. This is a simple website therefore gulp is just enough, but if you are working on a React, Angular or Vue.js website you may have something like webpack instead. Run the following command:

    gulp build
    
  3. If everything went alright you should see a list of files in the dist folder. Now we should upload these files to S3. If you have the AWS CLI configured in your machine you can easily upload the files by running the following command:

    If you do not have aws cli configured, you can simply login into AWS Web Console and upload your files manually. Just make sure you make all files public.

    aws s3 cp .\dist\ s3://YOUR_S3_BUCKET_NAME/ --acl public-read --recursive
    

    Note the --acl public-read parameter. This parameter will make the files public.

  4. Now you should go to your S3 bucket and configure the bucket to act as a Website. Go into bucket properties and select Static website hosting and save the changes. Also make sure your bucket is public. Take note of the Endpoint property, it should look something like: http://YOUR_BUCKET_NAME.s3-website-us-east-1.amazonaws.com.

  5. Now you should be able to browse the website using the Endpoint.

About

Statick HTML website to that makes calls to serverless slack invite api https://github.com/awshonolulu/slack-invitator-api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published