add service and first method to controller

This commit is contained in:
Николай Вигдоров
2025-03-01 23:54:08 +03:00
parent 83ad4d43cd
commit 12b3d5b23c
10 changed files with 632 additions and 17 deletions

24
src/consts.ts Normal file
View File

@ -0,0 +1,24 @@
export const MONGO_URL = 'mongodb://localhost:27017';
export const APP_CONTROLLER = 'storage-app';
export const DB_USERS = 'storage-back-users';
export const DB_STORAGES = 'storage-back-storages';
export const ALLOW_ORIGIN_ALL: [string, string] = [
'Access-Control-Allow-Origin',
'*',
];
export const ALLOW_CREDENTIALS: [string, string] = [
'Access-Control-Allow-Credentials',
'true',
];
export const CONTENT_LENGTH: [string, string] = ['Content-Length', '0'];
export const ALLOW_METHOD: [string, string] = [
'Access-Control-Allow-Methods',
'GET,HEAD,PUT,PATCH,POST,DELETE',
];
export const ALLOW_HEADERS: [string, string] = [
'Access-Control-Allow-Headers',
'Version, Authorization, Content-Type, Api-Name, x-turbo-id, x-turbo-compression, chrome-proxy, chrome-proxy-ect',
];