Created
November 24, 2017 10:19
-
-
Save joakin/d2936db75abf6a52c04a89e0a9bdf5dd to your computer and use it in GitHub Desktop.
Static Marvin build
This file contains 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
#!/bin/bash | |
git clone https://github.com/wikimedia/marvin.git | |
cd marvin/ | |
npm i | |
npm run build | |
# Run node server to get the HTML | |
node dist/server/index.js & | |
# Save the HTML to dist/ | |
curl http://localhost:3000/ > dist/index.html | |
# Kill the node server, we don't need it | |
kill %1 | |
# At this point dist/ has all a standalone static webapp needs, so we can just serve it | |
npm install -g pushstate-server | |
pushstate-server dist/ | |
# Open browser, visit http://0.0.0.0:9000 and navigate around |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment