That’s almost certainly a bad idea. The answer is sort of “if you don’t know how, then you probably shouldn’t,” but there is an expose
section in app.yml
that you can modify. But then you’ll need to figure out how to do something about controlling access.
Have you considered the Discourse Data Explorer Plugin? It’s safe, easy, and you can find plenty of examples.