Initialize the WhatsApp API Express application
masterThe WhatsApp API is built on an Express application instance. When importing the module, the application is pre-configured with body-parser middleware to handle JSON and URL-encoded payloads. The payload size limit is dynamically set based on the maxAttachmentSize configuration plus a 1MB buffer to accommodate metadata. The application also automatically calls restoreSessions() upon initialization to recover previous WhatsApp sessions.
To use the application, require the module in your entry point. The exported object is a standard Express app instance.