Shinigami92 / star-citizen-trade-market-api

Star Citizen Trade Market Backend API
MIT License
13 stars 1 forks source link

[FEATURE REQUEST] Add option to configure server listen ip #12

Closed ST-DDT closed 4 years ago

ST-DDT commented 4 years ago

Is your feature request related to a problem? Please describe.

Currently the API is listening on 0.0.0.0:3000, so theoretically it is possible to connect directly to that port. But I wish to listen to only a single network interface.

https://stackoverflow.com/a/12181334/4573065 main.ts#L14

Describe the solution you'd like

I would like to have a property that allows me to change the listening ip similar to the port. main.ts#L9 The default should still be both 0.0.0.0 and ::. Having the ability to specify multiple addresses (e.g. both the IP4 and IP6 address would be nice)

Shinigami92 commented 4 years ago

closed via https://github.com/Shinigami92/star-citizen-trade-market-api/commit/8fb89471a62220f23a803b7fef0f1e9bdaaf2644

You can configure API_HOSTNAME in your .env file and set it to localhost, 0.0.0.0, ::1 or similar If you leave it blank or dont set it, the default will be taken. On my machine 💻 that results in http://[::1]:3000