<commit_before>var Import = require('./Import');
var express = Import.getExpress();
var bodyParser = Import.getBodyParser();
var PushUser = Import.getPushUser();
var Push = Import.getPush();

var app = express();

app.set('port', (process.env.PORT || 3000));

app.use( bodyParser.json() );       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({     // to support URL-encoded bodies
  extended: true
})); 

app.post('/push', function(req, res) {
  console.log("push userid : " + req.body.userId);
    var user_id = req.body.userId,
    var message = req.body.message;
    PushUser.getPushIds(user_id).then(
      function(ids) {
      Push.push(ids,message);
      res.end('Push Go');
    },function(err){
      res.end(err);
    }
    );
});

app.post('/reg', function(req, res) { 
	  var dev_id = req.body.deviceId;
	  var user_id = req.body.userId;
	  var push_id = req.body.pushId;
	  PushUser.upsert(dev_id,user_id,push_id);
    res.json({isSuccess:true})
    res.end();
});
app.get('/isUserReg', function(req, res) { 
    var user_id = req.body.userId;
    PushUser.getPushIds(user_id).then(
      (id)=>{
        res.json({isReg:true});
        res.end();
      },
      (err)=>{
        res.json({isReg:false});
        res.end();
      });
});

app.post('/delete', function(req, res) {
  var dev_id = req.body.deviceId;
  PushUser.deletePushId(dev_id);
  res.end('deletePushId:' + dev_id);
});

app.listen(app.get('port'), function() {
  console.log('Server started: http://localhost:' + app.get('port') + '/');
});
<commit_msg>add log<commit_after>var Import = require('./Import');
var express = Import.getExpress();
var bodyParser = Import.getBodyParser();
var PushUser = Import.getPushUser();
var Push = Import.getPush();

var app = express();

app.set('port', (process.env.PORT || 3000));

app.use( bodyParser.json() );       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({     // to support URL-encoded bodies
  extended: true
})); 

app.post('/push', function(req, res) {
        console.log("body userid : " + req.body.userId + "body message : " + req.body.message);
    var user_id = req.body.userId,
    message = req.body.message;
          console.log("userid : " + user_id + "message : " + message);
    PushUser.getPushIds(user_id).then(
      function(ids) {
      Push.push(ids,message);
      res.end('Push Go');
    },function(err){
      res.end(err);
    }
    );
});

app.post('/reg', function(req, res) { 
	  var dev_id = req.body.deviceId;
	  var user_id = req.body.userId;
	  var push_id = req.body.pushId;
	  PushUser.upsert(dev_id,user_id,push_id);
    res.json({isSuccess:true})
    res.end();
});
app.get('/isUserReg', function(req, res) { 
    var user_id = req.body.userId;
    PushUser.getPushIds(user_id).then(
      (id)=>{
        res.json({isReg:true});
        res.end();
      },
      (err)=>{
        res.json({isReg:false});
        res.end();
      });
});

app.post('/delete', function(req, res) {
  var dev_id = req.body.deviceId;
  PushUser.deletePushId(dev_id);
  res.end('deletePushId:' + dev_id);
});

app.listen(app.get('port'), function() {
  console.log('Server started: http://localhost:' + app.get('port') + '/');
});

{'fraction_non_alphanumeric': 0.19115815691158156, 'fraction_numerical': 0.0024906600249066002, 'mean_word_length': 3.161917098445596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1012984', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1122, 'n_words': 199}