<commit_before>/*
 *    Modules
 */

var express = require('express');
var Q = require('q');
var http = require('http');
var fs = require('fs');
//var powernode = require('./lib/powernode');

/*
 *    Configuration
 */

var config  = JSON.parse(fs.readFileSync('config.json'));
//var secrets = JSON.parse(fs.readFileSync('secrets.json'));
var version = JSON.parse(fs.readFileSync('package.json')).version;

//powernode.setAppString('CenterScout v' + version);

/*
 *    ExpressJS Setup
 */

// Create ExpressJS instance
var app = express();

// Default port is 8080
app.set('port', process.env.PORT || 8080);

// Define static/ folder
app.use(express.static('./static'));

// Middleware for POST requests
app.use(express.json());

app.use(function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    next();
});

/*
 *    API Endpoints
 */

var data = [
        {
            'name':  'Chapter 12 TEST',
            'class': 'M',
            'date':  '02/15',
            'percent': '98%',
            'fraction': '49/50'
        },
        {
            'name':  'Chapter 12 Homework',
            'class': 'M',
            'date':  '05/29',
            'percent': '100%',
            'fraction': '24/24'
        },
        {
            'name':  'Chapter 12.3 Quiz',
            'class': 'M',
            'date':  '05/30',
            'percent': '86%',
            'fraction': '26/30'
        },
        {
            'name':  'Phone Case Project',
            'class': 'CAD',
            'date':  '06/01',
            'percent': '100%',
            'fraction': '30/30'
        },
        {
            'name':  'Machine Vise Project',
            'class': 'CAD',
            'date':  '03/16',
            'percent': '100%',
            'fraction': '30/30'
        },

    ];

// Get PowerSchool(R) data
app.get('/api/grades', function(req, res) {
    var username = req.body.username;
    var password = req.body.password;
    res.writeHead(200, { 'Content-Type': 'application/json' });
    // powernode
    //     .getStudentData('chsd115.lfschools.net', username, password)
    //     .then(JSON.stringify).then(res.end);
    res.end(JSON.stringify(data));
});

// Get assignments from www.lakeforestschools.org
app.get('/api/assignments', function(req, res) {

});

/*
 *    NodeJS Setup
 */
<commit_msg>Add more placeholder data<commit_after>/*
 *    Modules
 */

var express = require('express');
var Q = require('q');
var http = require('http');
var fs = require('fs');
//var powernode = require('./lib/powernode');

/*
 *    Configuration
 */

var config  = JSON.parse(fs.readFileSync('config.json'));
//var secrets = JSON.parse(fs.readFileSync('secrets.json'));
var version = JSON.parse(fs.readFileSync('package.json')).version;

//powernode.setAppString('CenterScout v' + version);

/*
 *    ExpressJS Setup
 */

// Create ExpressJS instance
var app = express();

// Default port is 8080
app.set('port', process.env.PORT || 8080);

// Define static/ folder
app.use(express.static('./static'));

// Middleware for POST requests
app.use(express.json());

app.use(function(req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    next();
});

/*
 *    API Endpoints
 */

var data = [
        {
            'name':  'Chapter 12 TEST',
            'class': 'Math',
            'date':  '02/15',
            'percent': '98%',
            'fraction': '49/50'
        },
        {
            'name':  'Chapter 12 Homework',
            'class': 'Math',
            'date':  '05/29',
            'percent': '100%',
            'fraction': '24/24'
        },
        {
            'name':  'Chapter 12.3 Quiz',
            'class': 'Math',
            'date':  '05/30',
            'percent': '86%',
            'fraction': '26/30'
        },
        {
            'name':  'Phone Case Project',
            'class': 'CAD',
            'date':  '06/01',
            'percent': '100%',
            'fraction': '30/30'
        },
        {
            'name':  'Machine Vise Project',
            'class': 'CAD',
            'date':  '03/16',
            'percent': '100%',
            'fraction': '30/30'
        },
        {
            'name':  'Portfolio Project',
            'class': 'English',
            'date':  '02/15',
            'percent': '98%',
            'fraction': '49/50'
        },
        {
            'name':  '<NAME>',
            'class': 'English',
            'date':  '10/15',
            'percent': '94%',
            'fraction': '94/100'
        },
        {
            'name':  '<NAME>',
            'class': 'English',
            'date':  '10/20',
            'percent': '100%',
            'fraction': '50/50'
        },
        {
            'name':  'Chapter 12 TEST',
            'class': 'History',
            'date':  '06/01',
            'percent': '90%',
            'fraction': '45/50'
        },
        {
            'name':  'Chapter 13 TEST',
            'class': 'History',
            'date':  '03/16',
            'percent': '96%',
            'fraction': '46/50'
        }
    ];

// Get PowerSchool(R) data
app.get('/api/grades', function(req, res) {
    var username = req.body.username;
    var password = req.body.password;
    res.writeHead(200, { 'Content-Type': 'application/json' });
    // powernode
    //     .getStudentData('chsd115.lfschools.net', username, password)
    //     .then(JSON.stringify).then(res.end);
    res.end(JSON.stringify(data));
});

// Get assignments from www.lakeforestschools.org
app.get('/api/assignments', function(req, res) {

});

/*
 *    NodeJS Setup
 */

{'fraction_non_alphanumeric': 0.19091884161601716, 'fraction_numerical': 0.036467643904183056, 'mean_word_length': 1.73193359375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5141397', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1770, 'n_words': 364}