Skip to content

Instantly share code, notes, and snippets.

@GabenGar
GabenGar / server.js
Created December 3, 2022 02:18
NextJS https server
// @ts-check
// server.js
const { createServer } = require("https");
const fs = require("fs").promises;
const { parse } = require("url");
const next = require("next").default;
const hostname = "localhost";
const port = 3000;
const app = next({ dev: true, hostname, port });
@GabenGar
GabenGar / Dockerfile
Last active July 14, 2022 13:05
Get golang compiler from golang alpine image into another alpine-based image (python in this case).
# syntax=docker/dockerfile:1
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG GOLANG_IMAGE=golang:1.18-alpine
ARG PYTHON_IMAGE=python:3.9-alpine
FROM ${GOLANG_IMAGE} AS golang
# installing golang into a python image because it's less hassle
# than the other way around