function postexample(req, res) {
    var data1 = req.body.data1 == undefined ? null :req.body.data1;
    var data2 = req.body.data2 == undefined ? null :req.body.data2;

    sample_db.postexample(data1,data2, function (err,data) {
        res.json(data)
    });
}
//method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method - POST
function postexample(req, res) {
    var data1 = req.body.data1 == undefined ? null :req.body.data1;
    var data2 = req.body.data2 == undefined ? null :req.body.data2;
    sample_db.postexample(data1,data2, function (err,data) {
        res.json(data)
    });
}
function postexample ( req , res ) { var data1 = req . body . data1 == undefined ? null : req . body . data1 ; var data2 = req . body . data2 == undefined ? null : req . body . data2 ; sample_db . postexample ( data1 , data2 , function ( err , data ) { res . json ( data ) } ) ; }
method to get the data from the request and pass to db method-POST
method to get the data from the request and pass to db method - POST