fix: correct server class structure and improve error handling

main
borja (aider) 3 months ago
parent 352d201db5
commit 2b4d95d3ab

@ -1,4 +1,10 @@
import { WebhookServer } from './src/server';
console.log("Starting WhatsApp Task Bot...");
try {
WebhookServer.start();
console.log("Server started successfully");
} catch (error) {
console.error("Failed to start server:", error);
process.exit(1);
}

@ -5,7 +5,11 @@ describe('WebhookServer', () => {
const envBackup = process.env;
beforeEach(() => {
process.env = { ...envBackup, INSTANCE_NAME: 'test-instance' };
process.env = {
...envBackup,
INSTANCE_NAME: 'test-instance',
NODE_ENV: 'test'
};
});
afterEach(() => {

Loading…
Cancel
Save