separate from any Galvanize forked & cloned project //so that your .git stuff is not mixed up with their .git stuff
-
$ npm init -y//creates package.json which allows you to set-up your project dependencies--js libraries for your project
//create a start script in your package.json:
"start": "node app.js"//it may also be required to make sure that your "main" a couple lines above is like so:
"main": "app.js",
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
| # Logs | |
| logs | |
| *.log | |
| npm-debug.log* | |
| yarn-debug.log* | |
| yarn-error.log* | |
| # Runtime data | |
| pids | |
| *.pid |
Make sure you have created a github repo for your project. Stage, commit, and push your files and changes to this github repo first. Then, from within the project directory:
$ heroku login//put in your credentials to log-in to heroku$ heroku create (app_name)//this should automatically set-up a remote on heroku to push to$ heroku addons:create heroku-postgresql:hobby-dev//this is required when deploying to heroku with a database$ git remote -v
PREAMBLE: - make sure you have firebase cli installed: npm install -g firebase-tools in order to use the command line
- Log into firebase and create a project:
firebase login- create a new firebase project in the firebase GUI in the console, or there will be an option to create it from CL later as an option during
firebase initprocess.
- create a new firebase project in the firebase GUI in the console, or there will be an option to create it from CL later as an option during
- Make sure npm isn’t running anything any place in any terminal
- cd into the root directory of your project and run:
firebase init- Which Firebase feature do you want to use?
Hosting
- Which Firebase feature do you want to use?
- Associate this project dir w/ a Firebase project. [ A list of all your projects on Firebase will be output. Arrow down to the project and hit enter. ]
These instructions will lead you through how to deploy a static website on firebase
- Sign up for an account on Firebase.
- In your terminal, install the Firebase CLI tools. (This also updates you to the latest version of firebase.)
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
| *Publishing react to firebase* | |
| // Log into firebase and create a project | |
| // Make sure npm isn’t running anything any place in any terminal | |
| // Change to your react app folder | |
| *npm run build* | |
| // creates a build folder and merges files into a compact build version | |
| *firebase init* | |
| // select hosting | |
| // select your project |
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
| *Publishing Angular to firebase* | |
| // Log into firebase and create a project | |
| // Make sure npm isn’t running anything any place in any terminal | |
| // Change to your angular app folder. | |
| //For me, I did the first dino drill in angular, and so I was in the version-1 folder, and my project folder was named drill1angular. So, from the version-1 folder, I typed `cd drill1angular` | |
| *ng build --prod* | |
| // creates a build folder and merges files into a compact build version. | |
| // Now...cd into your dist/project-folder. Again, I named my project folder drill1angular, and since I was already in version-1/drill1angular, I typed cd dist/drill1angular. _Yes, now there's two project folders named the same thing that are in different places._ Make _sure_ you're in the project folder inside the dist folder. For me, that path was version-1/drill1angular/dist/drill1angular | |
| *firebase init* |