Binding IP for a nest application is verbose
See original GitHub issueHullo 👋
Currently if you want to bind your express instance to a specific IP you end up with something like this:
@Module({})
class ApplicationModule {}x
function createApp (
server: express.Application,
port: number,
address: string
): Promise<INestApplication> {
const app = NestFactory.create(ApplicationModule, server)
app.init()
return eventToPromise(server.listen(port, address), 'listening').then(
() => app
)
}
It would seem more ideal if NestApplication.listen() better reflected the options that ExpressAppliation.listen() takes? The above isn’t so ideal given that it doesn’t check if the nest application has already been initialised.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
DHCP IP reservation or Set a Static IP address for a device
Open the Google Home app . Tap Wi-Fi and then Settings and then Advanced Networking. Tap DHCP IP reservations and then Add IP...
Read more >gRPC - Microservices - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines ...
Read more >Node.js EACCES error when listening on most ports
I use npm run dev to run my Nodejs app in Windows and it works fine. But I got this error on my...
Read more >Oppo Blu-ray player - Bindings - openHAB
# Thing Configuration · If using direct IP connection on the BDP series (83/93/95/103/105), verbose mode is not supported. · For some reason...
Read more >Nodejs Security - OWASP Cheat Sheet Series
Node.js applications are prone to all kinds of web application vulnerabilities. ... can be used to feed Intrusion Detection/Prevention Systems (IDS/IPS).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@TobyColeman environment variables?
Hi @TobyColeman, Since @nestjs/core 4.0.4 the
listen()
method acceptshostname
as a second argument 🙂