mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
Перенес файлы в общую папку
This commit is contained in:
parent
b9a45b69b4
commit
7c835e145a
14 changed files with 7 additions and 9 deletions
0
config/.gitignore → shared/config/.gitignore
vendored
0
config/.gitignore → shared/config/.gitignore
vendored
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "config",
|
"name": "config",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
|
@ -2,9 +2,7 @@ const fs = require('fs');
|
||||||
const yaml = require('yaml');
|
const yaml = require('yaml');
|
||||||
|
|
||||||
const config = () => {
|
const config = () => {
|
||||||
try {
|
if (!fs.existsSync('../config.yaml')) return;
|
||||||
fs.readFileSync('../config.yaml', 'utf-8');
|
|
||||||
} catch { return }
|
|
||||||
|
|
||||||
return yaml.parse(fs.readFileSync('../config.yaml', 'utf-8'));
|
return yaml.parse(fs.readFileSync('../config.yaml', 'utf-8'));
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "database",
|
"name": "database",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "postgresql.js",
|
"main": "src/postgresql.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
|
@ -1,5 +1,5 @@
|
||||||
const pool = require('./postgresql.js');
|
const pool = require('./postgresql.js');
|
||||||
const logger = require('../logger/main.js');
|
const logger = require('../../logger/src/main.js');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getting the currency exchange rate for a specific day
|
* Getting the currency exchange rate for a specific day
|
|
@ -1,5 +1,5 @@
|
||||||
const pg = require("pg");
|
const pg = require("pg");
|
||||||
const config = require("../config/main.js")();
|
const config = require("../../config/src/main.js")();
|
||||||
|
|
||||||
const pool = new pg.Pool({
|
const pool = new pg.Pool({
|
||||||
user: config['database']['user'],
|
user: config['database']['user'],
|
0
logger/.gitignore → shared/logger/.gitignore
vendored
0
logger/.gitignore → shared/logger/.gitignore
vendored
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "logger",
|
"name": "logger",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
|
@ -1,7 +1,7 @@
|
||||||
const pino = require('pino');
|
const pino = require('pino');
|
||||||
const pretty = require('pino-pretty');
|
const pretty = require('pino-pretty');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const config = require('../config/main.js')();
|
const config = require('../../config/src/main.js')();
|
||||||
|
|
||||||
function getCallerFile() {
|
function getCallerFile() {
|
||||||
const originalFunc = Error.prepareStackTrace;
|
const originalFunc = Error.prepareStackTrace;
|
Loading…
Add table
Reference in a new issue