Skip to content

Instantly share code, notes, and snippets.

View bubbajoe's full-sized avatar
🏠
Working from home

Joe Williams bubbajoe

🏠
Working from home
View GitHub Profile
use axum::{
extract::{Extension, Path},
routing::get,
AddExtensionLayer, Router,
};
use hyper::service::make_service_fn;
use std::{
convert::Infallible,
sync::{Arc, Mutex},
};
upstream node_server {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
@rolaveric
rolaveric / reverseProxy.go
Created February 23, 2014 06:25
Example of a reverse proxy written in Go
import (
"net/http"
"net/http/httputil"
"net/url"
"fmt"
)
func main() {
// New functionality written in Go
http.HandleFunc("/new", func(w http.ResponseWriter, r *http.Request) {
Server.java
/* ------------------
Server
usage: java Server [RTSP listening port]
---------------------- */
import java.io.*;
import java.net.*;