<commit_before>var express = require('express');
var app = express();
var Chat = require('./models/chat')
var bodyParser = require('body-parser')

app.use(bodyParser.json())

app.post('/api/chats', function (req, res) {
    var chat = new Chat(req.body)
    chat.save(function(err,doc){
        res.send(201,doc)
    })
});

module.exports = app<commit_msg>Fixed res.send deprecated method in express<commit_after>var express = require('express');
var app = express();
var Chat = require('./models/chat')
var bodyParser = require('body-parser')

app.use(bodyParser.json())

app.post('/api/chats', function (req, res) {
    var chat = new Chat(req.body)
    chat.save(function(err,doc){
        res.status(201).send(doc)
    })
});

module.exports = app
{'fraction_non_alphanumeric': 0.1768617021276596, 'fraction_numerical': 0.007978723404255319, 'mean_word_length': 4.157534246575342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6828797', 'n_tokens_mistral': 249, 'n_tokens_neox': 243, 'n_words': 54}