Skip to content

Instantly share code, notes, and snippets.

@jahvi
Created April 6, 2019 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jahvi/4a44ac0636cc2e899b4a0854d90fce76 to your computer and use it in GitHub Desktop.
Save jahvi/4a44ac0636cc2e899b4a0854d90fce76 to your computer and use it in GitHub Desktop.
const express = require('express');
const { middleware } = require('@magento/upward-js');
async function serve() {
const app = express();
const port = 8000;
app.get('/', (req, res) => res.send('Hello from Express!'));
const upwardMiddleware = await middleware(`${__dirname}/upward.yml`);
app.use(upwardMiddleware);
app.listen(port, () => console.log(`Listening on port ${port}!`));
}
serve();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment