Описание конфигурации server
export interface Config {
db: {
connection: string;
};
emailTransporter?: {
host: string;
port: number;
auth: {
user: string;
pass: string;
};
};
noConfirmation?: boolean;
host: string;
jwt: {
secret_key: string;
};
bot?: {
title: string;
name: string;
token: string;
chatId: string;
};
}
const config: Config = {
db: {
connection: "", //Строка подключения к postgresql postgres://user:password@localhost:5432/cms
},
emailTransporter: {
//Данные почтового сервера
host: "",
port: 465,
auth: {
user: "",
pass: "",
},
},
noConfirmation: false, //Режим без подтверждения email. Для разработки удобнее значение true, т.к. упрощает процесс регистрации
host: "", //URL сайта. Пример: http://localhost:3000
jwt: {
secret_key: "", // Ключ для шифрования токенов, случайная строка
},
};
export default config;