Добавлен контроллер пользователей, описана схема, подключен сервис для работы с БД, описана первая ручка для получения списка пользователей

This commit is contained in:
vigdorov
2020-07-26 00:53:58 +03:00
parent 8a809db67d
commit 7c62c57f2d
11 changed files with 392 additions and 54 deletions

11
src/consts.ts Normal file
View File

@ -0,0 +1,11 @@
export const USERS_CONTROLLER = 'users';
export const AUTH_CONTROLLER = 'auth';
export const MONGO_URL = 'mongodb://localhost:27017';
export const DB_NAME = 'auth-service';
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'];