Перенес файлы в общую папку

This commit is contained in:
Данил 2024-08-14 17:14:38 +03:00
parent b9a45b69b4
commit 7c835e145a
14 changed files with 7 additions and 9 deletions

View file

@ -1,7 +1,7 @@
{
"name": "config",
"version": "1.0.0",
"main": "main.js",
"main": "src/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},

View file

@ -2,9 +2,7 @@ const fs = require('fs');
const yaml = require('yaml');
const config = () => {
try {
fs.readFileSync('../config.yaml', 'utf-8');
} catch { return }
if (!fs.existsSync('../config.yaml')) return;
return yaml.parse(fs.readFileSync('../config.yaml', 'utf-8'));
}

View file

@ -1,7 +1,7 @@
{
"name": "database",
"version": "1.0.0",
"main": "postgresql.js",
"main": "src/postgresql.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},

View file

@ -1,5 +1,5 @@
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

View file

@ -1,5 +1,5 @@
const pg = require("pg");
const config = require("../config/main.js")();
const config = require("../../config/src/main.js")();
const pool = new pg.Pool({
user: config['database']['user'],

View file

@ -1,7 +1,7 @@
{
"name": "logger",
"version": "1.0.0",
"main": "main.js",
"main": "src/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},

View file

@ -1,7 +1,7 @@
const pino = require('pino');
const pretty = require('pino-pretty');
const path = require('path');
const config = require('../config/main.js')();
const config = require('../../config/src/main.js')();
function getCallerFile() {
const originalFunc = Error.prepareStackTrace;