Miscellaneous tips & tricks
Start a server for a folder
python -m SimpleHTTPServer in your project folder to make it available at
Note: The syntax above is for the Python 2.x that comes preinstalled with macOS and Linux. The equivalent syntax for Python 3 is
python -m http.server.
If you're using Node.js, you can also use the
serve package, which you can run without installing with
npx (it comes with recent versions of
An even simpler server is servor:
Also take a look at budo.
Make an S3 bucket publicly available
To use a S3 bucket to keep a bunch of files and make them publicly available, you need to make a bucket policy. This is under Permissions section on the Properties tab for your bucket. Paste this into the bucket policy (
myBucketName should be the name of your bucket):
All the files inside will typically be available at
http://myBucketName.s3.amazonaws.com/path/to/file but you can grab the exact URL from the Static Website Hosting section in the Properties tab.
Extra credit: This is super-useful for hosting video files, since S3 supports partial content requests which is needed to loop
<video> on your web pages.