Dummy node script to respond 200 (or anything) to a call for testing purposes

This is as bare a node App as you can make but it comes in handy when you want a . dummy server just to return 200s and or a JSON object at super fast speeds on small systems:

 

var express = require('express');

var app     = express();


app.get('*', function(req, res) {
    res.sendStatus(200);
});

app.listen('3000');

console.log('Magic happens on port 3000');

exports = module.exports = app;


Before running the js file run 
npm install express 

to deploy express..

Thats it !

nJoy 😉

Write a Reply or Comment

Your email address will not be published.