Skip to content

Commit

Permalink
chore: project config setup
Browse files Browse the repository at this point in the history
  • Loading branch information
buka4rill committed Jun 9, 2024
1 parent 32a8e15 commit 2bd36f9
Show file tree
Hide file tree
Showing 11 changed files with 665 additions and 64 deletions.
4 changes: 4 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PROFILE=local
NODE_ENV=development

PORT=3008
6 changes: 6 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const { join } = require('path');

const profile = process.env.PROFILE || 'local';
const configProfile = require(join(__dirname, profile));

module.exports = configProfile;
5 changes: 5 additions & 0 deletions config/server.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { registerAs } from '@nestjs/config';

export default registerAs('server', () => ({
port: parseInt(process.env.PORT, 10) || 3008,
}));
Loading

0 comments on commit 2bd36f9

Please sign in to comment.