nests socket connection within routes, socket emits data successfuly to client