Skip to content

Commit

Permalink
Merge pull request #232 from descampsk/add-home-page
Browse files Browse the repository at this point in the history
add home page
  • Loading branch information
descampsk authored May 5, 2024
2 parents 2e24195 + 64933e6 commit fe67cd2
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 0 deletions.
32 changes: 32 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@nestjs/config": "3.2.2",
"@nestjs/core": "10.3.8",
"@nestjs/platform-express": "10.3.8",
"@nestjs/serve-static": "^4.0.2",
"@nestjs/swagger": "^7.3.1",
"@nestjs/terminus": "10.2.3",
"@types/cache-manager-redis-store": "2.0.4",
Expand Down
41 changes: 41 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<title>NestJS Playground</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}
.container {
text-align: center;
}
a {
display: inline-block;
margin: 10px;
padding: 10px 20px;
color: #fff;
background-color: #007BFF;
text-decoration: none;
border-radius: 5px;
}
a:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to the NestJS Playground</h1>
<p>Please find the documentation for our modules below:</p>
<a href="/prime/docs/">PrimeModule Documentation</a>
<a href="/auth0/docs/">Auth0Module Documentation</a>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { HealthModule } from './core/health/health.module';
import { ConditionalModule, ConfigModule } from '@nestjs/config';
import { LoggerConfig } from './core/logger/logger.config';
import { PrimeModule } from './modules/prime/prime.module';
import { Auth0Module } from './modules/auth0/auth0.module';
import { join } from 'path';

const conditionalModules = [PrimeModule, Auth0Module];
const registerConditionalModules = conditionalModules.map((module) =>
Expand All @@ -17,6 +19,9 @@ const registerConditionalModules = conditionalModules.map((module) =>

@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'public'),
}),
ConfigModule.forRoot({
isGlobal: true,
cache: true,
Expand Down

0 comments on commit fe67cd2

Please sign in to comment.