Last active
December 23, 2018 14:06
-
-
Save fega/e3643393552f18b46511fb23cb192986 to your computer and use it in GitHub Desktop.
Quick deploy moser 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 folder | |
# Create the config file | |
module.exports{ | |
port: process.env.PORT || 3000, | |
db: process.env.MONGO_URI | |
} | |
# Create package.json | |
npm init -y | |
git init | |
# Add start script to package.json | |
npm i -g json | |
npm i -S moser | |
json -I -f package.json -e 'this.scripts["start"]="npm run build"' | |
# CREATE Procfile | |
echo 'web: npm run start' > Procfile | |
# Create Heroku app | |
heroku create | |
# Add MongoDb Add-on | |
heroku addons:create mongolab:sandbox | |
# Commit changes | |
git add . | |
git commit -m "First commit" | |
git push heroku master | |
# deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment