<commit_before>var Ravel = require('../ravel.js');

var ravel = new Ravel();

ravel.module('sample', './sampleModule');

//FIXME working off of the tapestry-vm parameters for now
//redis parameters
ravel.set('redis host', '127.0.0.1');
ravel.set('redis port', 16379);
ravel.set('redis password', 'password');
//mysql parameters
ravel.set('mysql host', '127.0.0.1');
ravel.set('mysql port', '13306');
ravel.set('mysql user', 'tapestry');
ravel.set('mysql password', 'password');
ravel.set('mysql database name', 'tapestry_test_schema');
ravel.set('mysql connection pool size', '32');
//Node/express parameters
ravel.set('app domain', 'localhost');
ravel.set('app port', '9080');
ravel.set('node domain', 'localhost');
ravel.set('node port', '9080');
ravel.set('express public directory', 'public');
ravel.set('express view directory', 'ejs');
ravel.set('express view engine', 'ejs');
ravel.set('express session secret', '<KEY>');
//Google OAuth parameters
ravel.set('google oauth2 web client id', '1084472114850-2vo5cjdsm8go33ljqoap7k31j07bkohq.apps.googleusercontent.com');
ravel.set('google oauth2 web client secret', '<KEY>');
//Passport parameters
ravel.set('get user function', function() {
  //TODO implement
});
ravel.set('get or create user function', function() {
  //TODO implement
});

ravel.start();

ravel.modules.sample.tGetNumbers(undefined, undefined, function(err, result) {<commit_msg>Changing sample code to emphasize the fact that transaction endpoints are being created within registered modules<commit_after>var Ravel = require('../ravel.js');

var ravel = new Ravel();

ravel.module('sample', './sampleModule');

//FIXME working off of the tapestry-vm parameters for now
//redis parameters
ravel.set('redis host', '127.0.0.1');
ravel.set('redis port', 16379);
ravel.set('redis password', 'password');
//mysql parameters
ravel.set('mysql host', '127.0.0.1');
ravel.set('mysql port', '13306');
ravel.set('mysql user', 'tapestry');
ravel.set('mysql password', 'password');
ravel.set('mysql database name', 'tapestry_test_schema');
ravel.set('mysql connection pool size', '32');
//Node/express parameters
ravel.set('app domain', 'localhost');
ravel.set('app port', '9080');
ravel.set('node domain', 'localhost');
ravel.set('node port', '9080');
ravel.set('express public directory', 'public');
ravel.set('express view directory', 'ejs');
ravel.set('express view engine', 'ejs');
ravel.set('express session secret', '7UKBJcbNl5wrTkmcKGNB');
//Google OAuth parameters
ravel.set('google oauth2 web client id', '1084472114850-2vo5cjdsm8go33ljqoap7k31j07bkohq.apps.googleusercontent.com');
ravel.set('google oauth2 web client secret', '<KEY>');
//Passport parameters
ravel.set('get user function', function() {
  //TODO implement
});
ravel.set('get or create user function', function() {
  //TODO implement
});

ravel.start();

ravel.modules.sample.getNumbers(undefined, function(err, result) {
{'fraction_non_alphanumeric': 0.18128654970760233, 'fraction_numerical': 0.03990368077055383, 'mean_word_length': 6.251870324189526, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '6835038', 'n_tokens_mistral': 1027, 'n_tokens_neox': 911, 'n_words': 250}