Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
You can expect this to be Node code in <2 years
import { readFile } from 'fs';
import { createServer } from 'http';
createServer(async function (req, res) {
try {
var content = await readFile('foo.html');
} catch (e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment