Skip to content

Commit

Permalink
fix: ajust environments
Browse files Browse the repository at this point in the history
  • Loading branch information
William Koller committed Apr 27, 2022
1 parent b1d1983 commit 5ea06e8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
"testEnvironment": "node"
},
"engines": {
"node": "14"
"node": "16"
}
}
4 changes: 2 additions & 2 deletions src/config/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type EnvironmentType = {
defaultStrategy: string;
property: string;
session: string;
mongoUri: string;
mongoUrl: string;
redisHost: string;
redisPort: number;
redisAuthPass: string;
Expand All @@ -23,7 +23,7 @@ export const environments = (): EnvironmentType => {
defaultStrategy: process.env.DEFAULT_STRATEGY,
property: process.env.PROPERTY_USER,
session: process.env.SESSION,
mongoUri: process.env.MONGODB_URI,
mongoUrl: process.env.MONGODB_URL,
redisHost: process.env.REDIS_HOST,
redisPort: Number(process.env.REDIS_PORT),
redisAuthPass: process.env.REDIS_AUTH_PASS,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/app/app.settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const imports = [
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (config: ConfigService) => ({
uri: config.get('mongoUri'),
uri: config.get('mongoUrl'),
}),
}),
ScheduleModule.forRoot(),
Expand Down
2 changes: 1 addition & 1 deletion src/modules/graphql/graphql.settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { join } from 'path';
export const imports = [
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/graphql/schema.gql'),
autoSchemaFile: join(process.cwd(), 'src/modules/graphql/schema.gql'),
debug: true,
playground: true,
}),
Expand Down
23 changes: 23 additions & 0 deletions src/modules/graphql/schema.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------

type Book {
_id: String!
name: String!
description: String!
author: String!
status: String!
url: String!
createdAt: DateTime!
updatedAt: DateTime!
}

"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime

type Query {
books: [Book!]!
}

0 comments on commit 5ea06e8

Please sign in to comment.