Skip to content

Commit

Permalink
Create environment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Dec 4, 2024
1 parent 137cf14 commit 0d524ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/config/environment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// config/environment.js

const dotenv = require('dotenv');

// Load environment variables from a .env file into process.env
dotenv.config();

const environment = {
NODE_ENV: process.env.NODE_ENV || 'development',
PORT: process.env.PORT || 3000,
API_URL: process.env.API_URL || 'http://localhost:3000/api',
};

module.exports = environment;

0 comments on commit 0d524ab

Please sign in to comment.