Documentation for ApolloServer 4 Setup with Subscriptions & Context?

Is there sample code for ApolloServer 4 setup with subscriptions & context? I looked here:

…but it doesn’t seem to include code for ApolloServer setup.

I’ve found a lot of sample code on the web, but most of it seems to be for outdated versions of ApolloServer.