Fix configs loading #470
17 changed files with 17 additions and 17 deletions
2
index.js
2
index.js
|
@ -11,7 +11,7 @@ const Path = require('path');
|
||||||
|
|
||||||
// load local modules
|
// load local modules
|
||||||
const requestLogger = require('./server/middleware/requestLogger.js');
|
const requestLogger = require('./server/middleware/requestLogger.js');
|
||||||
const siteConfig = require('@config/siteConfig.js');
|
const siteConfig = require('@config/siteConfig');
|
||||||
const PORT = siteConfig.details.port;
|
const PORT = siteConfig.details.port;
|
||||||
const createDatabaseIfNotExists = require('./server/models/utils/createDatabaseIfNotExists.js');
|
const createDatabaseIfNotExists = require('./server/models/utils/createDatabaseIfNotExists.js');
|
||||||
const { getWalletBalance } = require('./server/lbrynet');
|
const { getWalletBalance } = require('./server/lbrynet');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const db = require('../../../../models');
|
const db = require('../../../../models');
|
||||||
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('@config/siteConfig.js');
|
const { publishing: { primaryClaimAddress, additionalClaimAddresses } } = require('@config/siteConfig');
|
||||||
const Sequelize = require('sequelize');
|
const Sequelize = require('sequelize');
|
||||||
const Op = Sequelize.Op;
|
const Op = Sequelize.Op;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { details, publishing } = require('@config/siteConfig.js');
|
const { details, publishing } = require('@config/siteConfig');
|
||||||
|
|
||||||
const createBasicPublishParams = (filePath, name, title, description, license, nsfw, thumbnail) => {
|
const createBasicPublishParams = (filePath, name, title, description, license, nsfw, thumbnail) => {
|
||||||
logger.debug(`Creating Publish Parameters`);
|
logger.debug(`Creating Publish Parameters`);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { details, publishing } = require('@config/siteConfig.js');
|
const { details, publishing } = require('@config/siteConfig');
|
||||||
|
|
||||||
const createThumbnailPublishParams = (thumbnailFilePath, claimName, license, nsfw) => {
|
const createThumbnailPublishParams = (thumbnailFilePath, claimName, license, nsfw) => {
|
||||||
if (!thumbnailFilePath) {
|
if (!thumbnailFilePath) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { details: { host } } = require('@config/siteConfig.js');
|
const { details: { host } } = require('@config/siteConfig');
|
||||||
|
|
||||||
const { sendGATimingEvent } = require('../../../../utils/googleAnalytics.js');
|
const { sendGATimingEvent } = require('../../../../utils/googleAnalytics.js');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { details: { host } } = require('@config/siteConfig.js');
|
const { details: { host } } = require('@config/siteConfig');
|
||||||
|
|
||||||
const sendEmbedPage = ({ params }, res) => {
|
const sendEmbedPage = ({ params }, res) => {
|
||||||
const claimId = params.claimId;
|
const claimId = params.claimId;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { apiHost, apiPort } = require('@config/lbryConfig.js');
|
const { apiHost, apiPort } = require('@config/lbryConfig');
|
||||||
const lbrynetUri = 'http://' + apiHost + ':' + apiPort;
|
const lbrynetUri = 'http://' + apiHost + ':' + apiPort;
|
||||||
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('../utils/googleAnalytics.js');
|
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('../utils/googleAnalytics.js');
|
||||||
const handleLbrynetResponse = require('./utils/handleLbrynetResponse.js');
|
const handleLbrynetResponse = require('./utils/handleLbrynetResponse.js');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const returnShortId = require('./utils/returnShortId.js');
|
const returnShortId = require('./utils/returnShortId.js');
|
||||||
const { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('@config/siteConfig.js');
|
const { assetDefaults: { thumbnail: defaultThumbnail }, details: { host } } = require('@config/siteConfig');
|
||||||
|
|
||||||
const NO_CLAIM = 'NO_CLAIM';
|
const NO_CLAIM = 'NO_CLAIM';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ const Blocked = require('./blocked.js');
|
||||||
const Sequelize = require('sequelize');
|
const Sequelize = require('sequelize');
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
|
|
||||||
const {database, username, password} = require('@config/mysqlConfig.js');
|
const {database, username, password} = require('@config/mysqlConfig');
|
||||||
|
|
||||||
// set sequelize options
|
// set sequelize options
|
||||||
const sequelize = new Sequelize(database, username, password, {
|
const sequelize = new Sequelize(database, username, password, {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const Sequelize = require('sequelize');
|
const Sequelize = require('sequelize');
|
||||||
|
|
||||||
const createDatabaseIfNotExists = () => {
|
const createDatabaseIfNotExists = () => {
|
||||||
const {database, username, password} = require('@config/mysqlConfig.js');
|
const {database, username, password} = require('@config/mysqlConfig');
|
||||||
const sequelize = new Sequelize('', username, password, {
|
const sequelize = new Sequelize('', username, password, {
|
||||||
dialect : 'mysql',
|
dialect : 'mysql',
|
||||||
logging : false,
|
logging : false,
|
||||||
|
|
|
@ -22,7 +22,7 @@ var _reactHelmet = _interopRequireDefault(require("react-helmet"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
var siteConfig = require('../../../config/siteConfig.js');
|
var siteConfig = require('@config/siteConfig');
|
||||||
|
|
||||||
module.exports = function (req, res) {
|
module.exports = function (req, res) {
|
||||||
var context = {}; // customize the reducer by passing in intial state configs
|
var context = {}; // customize the reducer by passing in intial state configs
|
||||||
|
|
|
@ -30,7 +30,7 @@ var _reactHelmet = _interopRequireDefault(require("react-helmet"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
var siteConfig = require('../../../config/siteConfig.js');
|
var siteConfig = require('@config/siteConfig');
|
||||||
|
|
||||||
var returnSagaWithParams = function returnSagaWithParams(saga, params) {
|
var returnSagaWithParams = function returnSagaWithParams(saga, params) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import App from '@app';
|
||||||
import renderFullPage from '../renderFullPage.js';
|
import renderFullPage from '../renderFullPage.js';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
|
|
||||||
const siteConfig = require('@config/siteConfig.js');
|
const siteConfig = require('@config/siteConfig');
|
||||||
|
|
||||||
module.exports = (req, res) => {
|
module.exports = (req, res) => {
|
||||||
let context = {};
|
let context = {};
|
||||||
|
|
|
@ -13,7 +13,7 @@ import Sagas from '@sagas';
|
||||||
import Actions from '@actions';
|
import Actions from '@actions';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
|
|
||||||
const siteConfig = require('@config/siteConfig.js');
|
const siteConfig = require('@config/siteConfig');
|
||||||
|
|
||||||
const returnSagaWithParams = (saga, params) => {
|
const returnSagaWithParams = (saga, params) => {
|
||||||
return function * () {
|
return function * () {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const multipart = require('connect-multiparty');
|
const multipart = require('connect-multiparty');
|
||||||
const { publishing: { uploadDirectory } } = require('@config/siteConfig.js');
|
const { publishing: { uploadDirectory } } = require('@config/siteConfig');
|
||||||
const multipartMiddleware = multipart({uploadDir: uploadDirectory});
|
const multipartMiddleware = multipart({uploadDir: uploadDirectory});
|
||||||
|
|
||||||
module.exports = multipartMiddleware;
|
module.exports = multipartMiddleware;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const ua = require('universal-analytics');
|
const ua = require('universal-analytics');
|
||||||
const { analytics : { googleId }, details: { title } } = require('@config/siteConfig.js');
|
const { analytics : { googleId }, details: { title } } = require('@config/siteConfig');
|
||||||
|
|
||||||
const createServeEventParams = (headers, ip, originalUrl) => {
|
const createServeEventParams = (headers, ip, originalUrl) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const chai = require('chai');
|
const chai = require('chai');
|
||||||
const expect = chai.expect;
|
const expect = chai.expect;
|
||||||
const chaiHttp = require('chai-http');
|
const chaiHttp = require('chai-http');
|
||||||
const { details: { host } } = require('@config/siteConfig.js');
|
const { details: { host } } = require('@config/siteConfig');
|
||||||
const { testChannel, testChannelId, testChannelPassword } = require('@devConfig/testingConfig.js');
|
const { testChannel, testChannelId, testChannelPassword } = require('@devConfig/testingConfig.js');
|
||||||
const requestTimeout = 20000;
|
const requestTimeout = 20000;
|
||||||
const publishTimeout = 120000;
|
const publishTimeout = 120000;
|
||||||
|
|
Loading…
Reference in a new issue