Skip to content

Instantly share code, notes, and snippets.

View kazuo-mu's full-sized avatar

Kazuo Murakami kazuo-mu

  • Fukuoka
View GitHub Profile
@kazuo-mu
kazuo-mu / web-servers.md
Created November 7, 2020 11:19 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
const aws = require("aws-sdk");
const sharp = require("sharp");
exports.handler = async (event) => {
const bucket = process.env['S3_BUCKET'];
const key = event.pathParameters.proxy;
const queryParams = event.queryStringParameters;
let resultImage = '';