Skip to content

Instantly share code, notes, and snippets.

@leocristofani
Created December 19, 2018 12:34
Show Gist options
  • Save leocristofani/65358119718c7bb45ecccafb1b42de0f to your computer and use it in GitHub Desktop.
Save leocristofani/65358119718c7bb45ecccafb1b42de0f to your computer and use it in GitHub Desktop.
Micro-frnotends in practice - expose path to embed files
/*
* Generates { js: 'path/to/index.[hash].js', css: 'path/to/index.[hash].css' }
* based on files available in /public/embed directory
*/
function getPathToEmbedAssets() {}
/**
* Exposes paths to embed assets
*/
app.get('/api/embed-assets', (req, res) => {
res.json(getPathToEmbedAssets());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment