<commit_before>
/**
 * Module dependencies
 */

var express = require('express'),
  routes = require('./routes'),
  api = require('./routes/api'),
  http = require('http'),
  path = require('path'),
  request = require('request');

var app = module.exports = express();


/**
 * Configuration
 */

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use('/swag/bootstrap', express.static(__dirname + '/node_modules/bootstrap/dist/'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(path.join(__dirname, 'public')));
app.use(app.router);

// development only
if (app.get('env') === 'development') {
  app.use(express.errorHandler());
}

// production only
if (app.get('env') === 'production') {
  // TODO
};


/**
 * Routes
 */

// serve index and view partials
app.get('/', routes.index);
app.get('/partials/:name', routes.partials);

// JSON API
app.get('/api/name', api.name);

//Post function
app.post('/mandiService/newUserRegistration', function(req,res){
   console.log(req.body.newUser);
});

app.post('/mandiService/userSignUp', function(req,res){
    var newUser = req.body.newUser;
    var vault = {vault: { userId: newUser.userName,
                          password: <PASSWORD>,
                          emailId: newUser.emailID }};
    console.log(JSON.stringify(vault));

    request.post('http://localhost:8080/public/saveregistrationinfo', {form: JSON.stringify(vault)}, function(err, res, body){
       if(err)
         console.log(err);
    });

});

// redirect all others to the index (HTML5 history)
app.get('*', routes.index);


/**
 * Start Server
 */

http.createServer(app).listen(app.get('port'), function () {
  console.log('Express server listening on port ' + app.get('port'));<commit_msg>- Updating the POST request.<commit_after>
/**
 * Module dependencies
 */

var express = require('express'),
  routes = require('./routes'),
  api = require('./routes/api'),
  http = require('http'),
  path = require('path'),
  request = require('request');

var app = module.exports = express();


/**
 * Configuration
 */

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use('/swag/bootstrap', express.static(__dirname + '/node_modules/bootstrap/dist/'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.static(path.join(__dirname, 'public')));
app.use(app.router);

// development only
if (app.get('env') === 'development') {
  app.use(express.errorHandler());
}

// production only
if (app.get('env') === 'production') {
  // TODO
};


/**
 * Routes
 */

// serve index and view partials
app.get('/', routes.index);
app.get('/partials/:name', routes.partials);

// JSON API
app.get('/api/name', api.name);

//Post function
app.post('/mandiService/newUserRegistration', function(req,res){
   console.log(req.body.newUser);
});

app.post('/mandiService/userSignUp', function(req,res){
    var newUser = req.body.newUser;
    var vault =  { userId: newUser.userName,
                   password: <PASSWORD>,
                   emailId: newUser.emailID };

    console.log(JSON.stringify(vault));

    request({
              method : 'POST',
              uri : 'http://localhost:8080/public/saveregistrationinfo',
              json : vault
            },
            function(err, res, body) {
                if(err)
                    console.log(err);
            });

});

// redirect all others to the index (HTML5 history)
app.get('*', routes.index);


/**
 * Start Server
 */

http.createServer(app).listen(app.get('port'), function () {
  console.log('Express server listening on port ' + app.get('port'));
{'fraction_non_alphanumeric': 0.19553941908713693, 'fraction_numerical': 0.00466804979253112, 'mean_word_length': 3.3680634201585504, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '990120', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1195, 'n_words': 236}