Express Sweet API Reference - v3.0.0
    Preparing search index...

    Variable mount

    mount: (app: Express) => Promise<void>

    Mount Express Sweet extensions on your Express application. Initializes all middleware in a specific order: Global → Environment → Database → HTTP → View → CORS → Local → Authentication → Router → Error Handler.

    Type Declaration

      • (app: Express): Promise<void>
      • Parameters

        • app: Express

          Express application instance

        Returns Promise<void>

    import express from 'express';
    import * as expx from 'express-sweet';

    const app = express();
    await expx.mount(app);

    app.listen(3000, () => {
    console.log('Server running on port 3000');
    });