I have a node express application that I want to only be available to the localhost client. How can I prevent other hosts from accessing my node express app?
When you start listening your server just mentioned the host name as 'localhost'. Take a look at the following code.
var app = require('express')();
app.listen(8000,'localhost');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With