Last active
August 9, 2021 21:00
-
-
Save fega/44f71aadced0b3863b54d1a301f7abba to your computer and use it in GitHub Desktop.
Quick deploy nuxt to heroku
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
# in the nuxt app directory | |
heroku create | |
# Set ENV_VARS | |
heroku config:set NPM_CONFIG_PRODUCTION=false HOST=0.0.0.0 NODE_ENV=production | |
# CREATE Procfile | |
echo 'web: npm run start' > Procfile | |
# ADD JSON script | |
npm i -g json | |
json -I -f package.json -e 'this.scripts["heroku-postbuild"]="npm run build"' | |
# Commit your changes | |
git add . | |
git commit -m "Added Nuxt deployment" | |
git push heroku master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment