How to use the @magento/upward-js.middleware function in @magento/upward-js

To help you get started, we’ve selected a few @magento/upward-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Jordaneisenburger / fallback-studio / src / pwa-studio / packages / pwa-buildpack / lib / WebpackTools / plugins / UpwardDevServerPlugin.js View on Github external
async networkFetch(path, options) {
                debug('networkFetch %s, %o', path, options);
                const { protocol } = new url.URL(path);
                if (protocol === 'https:') {
                    return fetch(
                        path,
                        Object.assign({ agent: httpsAgent }, options)
                    );
                }
                return fetch(path, options);
                // Use the https.Agent to allow self-signed certificates.
            }
        };

        this.middleware = await upward.middleware(
            this.upwardPath,
            this.env,
            io
        );
    }
    async getCompiler() {

@magento/upward-js

Implementation of the UPWARD spec as a NodeJS server

OSL-3.0
Latest version published 4 months ago

Package Health Score

81 / 100
Full package analysis