Created
March 3, 2018 00:58
-
-
Save kireerik/dfd0000b9dfe32c8575d7afe4b6ca752 to your computer and use it in GitHub Desktop.
Material-UI: Get started (Fast!) ⚡ React 16+
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
import http from 'http' | |
import fs from 'fs-extra' | |
const staticDirectory = process.env.RAZZLE_STATIC_PATH || 'static' | |
http.get({url: 'http://' + process.env.HOST + ':' + process.env.PORT | |
, headers: {'User-Agent': 'all'} | |
}, response => | |
response.on('data', html => | |
fs.writeFile(staticDirectory + '/' + 'index.html', html) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment