How to use the @magento/upward-js.createUpwardServer 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 / venia-concept / server.js View on Github external
dir: __dirname,
                    interactive: false
                })
            );
            upwardServerOptions.host = hostname;
            upwardServerOptions.https = ssl;
            upwardServerOptions.port = envPort || ports.staging || 0;
        } catch (e) {
            console.log(
                'Could not configure or access custom host. Using loopback...',
                e.message
            );
        }
    }
    console.log('Launching UPWARD server\n');
    await createUpwardServer(upwardServerOptions);
    console.log('\nUPWARD server running.');
}
github Jordaneisenburger / fallback-studio / src / pwa-studio / packages / venia-concept / server-lambda.js View on Github external
async function serve() {
    const config = loadEnvironment(__dirname);
    const upwardServerOptions = Object.assign(
        {},
        config.section('upwardJs'),
        config.section('stagingServer'),
        {
            env: process.env,
            before: app => {
                app.use(bestPractices());
            }
        }
    );

    const server = await createUpwardServer(upwardServerOptions);
    return server;
}

@magento/upward-js

Implementation of the UPWARD spec as a NodeJS server

OSL-3.0
Latest version published 6 months ago

Package Health Score

81 / 100
Full package analysis