<commit_before>var User    = require('../models/user');
var config  = require('../config');
var express = require('express');
var router  = express.Router();
var secret  = config.secret;

router.post('/signup', function (req, res, next) {
  var user = new User({
    username : req.body.username,
    password : <PASSWORD>
  });

  user.save(function (err) {
    if (err) res.send(err);
    res.json({
      message : 'User has been created!'
    });
  });
});

module.exports = router;<commit_msg>Add users route, get all users in db.<commit_after>var User    = require('../models/user');
var config  = require('../config');
var express = require('express');
var router  = express.Router();
var secret  = config.secret;

router.post('/signup', function (req, res, next) {
  var user = new User({
    username : req.body.username,
    password : <PASSWORD>
  });

  user.save(function (err) {
    if (err) res.send(err);
    res.json({
      message : 'User has been created!'
    });
  });
});

router.get('/users', function (req, res, next) {
  User.find(function (err, users) {
    if (err) res.send(err);
    res.json(users);
  });
});

module.exports = router;
{'fraction_non_alphanumeric': 0.18454935622317598, 'fraction_numerical': 0.0, 'mean_word_length': 3.24, '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': '5645220', 'n_tokens_mistral': 380, 'n_tokens_neox': 376, 'n_words': 100}