The url you get for a S3 hosted web site is a bit long. You might want to set up a subdomain from your domain that points to your S3 hosted site. The trick to do this involves how you name your bucket.
Here is an example.
Suppose your domain is mydomain.com
and you want to setup a subdomain myapp.mydomain.com
which points to a S3 hosted website.
To make this work the key is to create a bucket called myapp.mydomain.com
. This will give you a endpoint of http://myapp.mydomain.com.s3-website-us-west-2.amazonaws.com
.
So after setting up a few S3 hosted sites what happens if you want to move your site to another place. Say, you want to host the site over on an EC2 instance but you've already handed out the long url to your S3 bucket. It may be useful to have a redirect setup on the S3 bucket. Here is how to set that up.
Remove all your files except for the index.html
. Then edit the index.html
and remove all of it's content except the most basic of html. This is just so you don't have anything left of your site in the bucket.
You can host a static web site simply using a S3 bucket. To do so create your bucket and select it in the AWS console.
Select properties tab and then click on the 'Static website hosting' box. When prompted note the end point as this will be the url to your site. Then select 'Use this bucket to host a website'. Enter the appropriate index document. Typically, it will be index.html but if you have a different default page enter it here and save the prompt.
After working with Solidity for a while and using javascript-mode
it finally dawned on me to look for a Solidity mode and viola one exists.
Try package-list
in Emacs and look for `solidity-mode'
solidity-mode 20170712.1442 installed Major mode for ethereum's solidity language
If you don't see it you will need to point to MELPA so package.el
can find it. See the repo link below for more details.
Working against a local private testnet is very useful when you are developing your own smart contracts for Ethereum. It is faster and you don't have to worry about ether and having enough for gas.
One of the simplest methods to run a local testnet is to install testrpc
. When done just run the command testrpcs
and you'll have a local node with accounts running for you to excercise your code against.