In a cast iron or regular skillet, melt butter over medium high heat. Add onion and cook for 5 minutes. Nestle bratwurst among onions, add beer and bring to a slow boil. Reduce heat to a simmer and cook for 30-40 minutes, turning occasionally until beer cooks down and is evaporated. Remove onions and set aside. Raise the heat to medium high and brown sausages evenly on all sides. Serve on hoagie buns with onions and coarse, grainy mustard. Add sauerkraut if desired.