Created
April 6, 2019 11:45
-
-
Save jahvi/4a44ac0636cc2e899b4a0854d90fce76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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