mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-10-29 12:12:36 +01:00
* initial refactor * add scoredUp and scoredDown values for habits history entries, one entry per habit per day * fix lint and add initial migration * update old test * remove scoreNotes * dry run for migration * migration fixes * update migration and remove old test * fix * add challenges migration (read only) * fix challenges migration * handle custom day start * update tasks in migration * scoring: support cds * add new test
22 lines
773 B
JavaScript
22 lines
773 B
JavaScript
require('babel-register');
|
|
|
|
// This file must use ES5, everything required can be in ES6
|
|
|
|
function setUpServer () {
|
|
const nconf = require('nconf'); // eslint-disable-line global-require, no-unused-vars
|
|
const mongoose = require('mongoose'); // eslint-disable-line global-require, no-unused-vars
|
|
const setupNconf = require('../website/server/libs/setupNconf'); // eslint-disable-line global-require
|
|
|
|
setupNconf();
|
|
|
|
// We require src/server and npt src/index because
|
|
// 1. nconf is already setup
|
|
// 2. we don't need clustering
|
|
require('../website/server/server'); // eslint-disable-line global-require
|
|
}
|
|
setUpServer();
|
|
|
|
// Replace this with your migration
|
|
const processUsers = require('./tasks/habits-one-history-entry-per-day-challenges.js');
|
|
processUsers();
|