Skip to content

Commit 311a3a2

Browse files
committed
add ecosystem
1 parent d914e6f commit 311a3a2

5 files changed

Lines changed: 19 additions & 38 deletions

File tree

ecosystem.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// ecosystem.config.js
2+
module.exports = {
3+
apps: [
4+
{
5+
name: 'my-node-app',
6+
script: 'server.js',
7+
instances: 1, // or "max" for all CPUs
8+
autorestart: true,
9+
watch: false, // Set true if you want hot reload in dev
10+
max_memory_restart: '200M',
11+
env: {
12+
NODE_ENV: 'production',
13+
},
14+
},
15+
],
16+
};

server.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { LoggerModule } from './logger/logger.module';
1313
}),
1414
MongooseModule.forRootAsync({
1515
imports: [ConfigModule],
16-
useFactory: (configService: ConfigService) => {
17-
const uri = configService.get<string>('MONGO_URL');
16+
useFactory: () => {
17+
const uri = 'mongodb://localhost:27017/notifybd';
1818
if (!uri) {
1919
throw new Error('MONGO_URI not found in configuration');
2020
}

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as path from 'path';
1111
const envPath = path.resolve(__dirname, '../.env');
1212
dotenv.config({ path: envPath });
1313

14-
console.log('Environment variables loaded from:', process.env.MONGO_URL);
14+
//console.log('Environment variables loaded from:', process.env.MONGO_URL);
1515

1616
async function bootstrap() {
1717
const app = await NestFactory.create(AppModule);

web.config

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)