Hosting a Static Website possible?

Is it possible to host a static website on Tardigrade like on Amazon S3?

ref: https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html

To host a static website on Amazon S3, you configure an Amazon S3 bucket for website hosting and then upload your website content to the bucket. When you configure a bucket as a static website, you enable static website hosting, set permissions, and add an index document. Depending on your website requirements, you can also configure other options, including redirects, web traffic logging, and custom error documents.

Edit: ignoring the possible issue with the Object Fee due to the number of small files distributed with the website.

2 Likes

Yes. But not like on aws s3.
You can upload your static website to the bucket and create a share link for it.
At the moment you should list all objects which you want to share.
The sharing a whole bucket doesn’t work at the moment, but it should be fixed soon.
For example,

./uplink mb sj://test
echo '<html><body>Hello world! <br> <img src="tardigrade.png"></body></html>' | ./uplink put sj://test/index.html
./uplink cp ./tardigrade.png sj://test/
./uplink share sj://test sj://test/index.html sj://test/tardigrade.png --readonly --not-after "+1h"

You will get a long URL for you share. You will access your static website like
https://link.tardigradeshare.io/long_string/test/index.html

The only problem which I can see there, that is how to short this long URL to get a pretty URL.

5 Likes

Thanks for the info!

Is it possible to uplink the html source with a file simply in the following way instead of ./uplink put ?

./uplink cp index.html sj://test/

Of course. It’s just an example

1 Like

Follow-up:

For Object Fee, see: https://documentation.tardigrade.io/pricing/billing-and-payment#per-object-fee

I gave a shot and tried to proceed from the command mb to share, and it looks it worked smoothly. With a GUI file manager it would be very useful to host a website :slight_smile:

1 Like