/** * Comments/instructions for <%= classify(name)%>Service */ import { Injectable } from '@nestjs/common'; import { ConfigManager } from '@nestjsplus/lib-starter'; import * as Joi from '@hapi/joi'; @Injectable() export class ConfigService extends ConfigManager { // // See https://github.com/nestjsplus/config/wiki/Schemas // for details on providing a custom schema // // Replace the sample below with your custom schema // provideConfigSpec() { return { MY_GREETING: { validate: Joi.string(), required: true, }, // DB_HOST: { // validate: Joi.string(), // required: true, // }, // DB_USER: { // validate: Joi.string(), // required: true, // }, // DB_PORT: { // validate: Joi.number() // .min(5000) // .max(65535), // default: 5432, // }, // FIRST_NAME: { // validate: Joi.string(), // required: true, // }, // PORT: { // validate: Joi.number() // .min(3000) // .max(500), // default: 3000, // }, }; } }