Merge branch 'constants' into 'main'
Constants See merge request v3/service/user!44
This commit is contained in:
commit
27854fce77
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.9.5",
|
"@grpc/grpc-js": "^1.9.5",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mobicoop/user",
|
"name": "@mobicoop/user",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"description": "Mobicoop V3 User Service",
|
"description": "Mobicoop V3 User Service",
|
||||||
"author": "sbriat",
|
"author": "sbriat",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
export const SERVICE_NAME = 'user';
|
export const SERVICE_NAME = 'user';
|
||||||
|
|
||||||
// grpc
|
// grpc
|
||||||
|
export const GRPC_PACKAGE_NAME = 'user';
|
||||||
export const GRPC_SERVICE_NAME = 'UserService';
|
export const GRPC_SERVICE_NAME = 'UserService';
|
||||||
|
|
||||||
// configuration
|
// configuration
|
||||||
|
@ -11,6 +12,6 @@ export const SERVICE_CONFIGURATION_PROPAGATE_QUEUE =
|
||||||
'user-configuration-propagate';
|
'user-configuration-propagate';
|
||||||
|
|
||||||
// health
|
// health
|
||||||
export const HEALTH_SERVICE_NAME = 'health';
|
export const GRPC_HEALTH_PACKAGE_NAME = 'health';
|
||||||
export const HEALTH_USER_REPOSITORY = 'UserRepository';
|
export const HEALTH_USER_REPOSITORY = 'UserRepository';
|
||||||
export const HEALTH_CRITICAL_LOGGING_KEY = 'logging.user.health.crit';
|
export const HEALTH_CRITICAL_LOGGING_KEY = 'logging.user.health.crit';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { NestFactory } from '@nestjs/core';
|
||||||
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
|
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
import { HEALTH_SERVICE_NAME, SERVICE_NAME } from './app.constants';
|
import { GRPC_HEALTH_PACKAGE_NAME, GRPC_PACKAGE_NAME } from './app.constants';
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
@ -12,7 +12,7 @@ async function bootstrap() {
|
||||||
app.connectMicroservice<MicroserviceOptions>({
|
app.connectMicroservice<MicroserviceOptions>({
|
||||||
transport: Transport.GRPC,
|
transport: Transport.GRPC,
|
||||||
options: {
|
options: {
|
||||||
package: [SERVICE_NAME, HEALTH_SERVICE_NAME],
|
package: [GRPC_PACKAGE_NAME, GRPC_HEALTH_PACKAGE_NAME],
|
||||||
protoPath: [
|
protoPath: [
|
||||||
join(__dirname, 'modules/user/interface/grpc-controllers/user.proto'),
|
join(__dirname, 'modules/user/interface/grpc-controllers/user.proto'),
|
||||||
join(__dirname, 'health.proto'),
|
join(__dirname, 'health.proto'),
|
||||||
|
|
Loading…
Reference in New Issue