-create a new repo on Github
git clone repo
-add a .gitignore and at the very least type in node_modules and .env
| const express = require('express') | |
| const app = express() | |
| const bodyParser = require('body-parser') | |
| const port = 9000 | |
| const cors = require('cors') | |
| app.use(cors()) | |
| app.use(bodyParser.json()) | |
Please complete this project proposal thoroughly so that your instructors can review it and have an intelligent conversation with you about requirements, scope, feasiblity, etc. Proposals will be due by the end of day on Friday before capstones start. If you don't have your idea fully fleshed out, complete the portions of this you can so that an instructor can help you flesh out the rest of your idea.
A Build Your Custom Guitar web app for guitar players to create a custom-built guitar body with their body, wood, and finish of their choosing. At the end of the build, they will see an overview of the specs they've choosen and will be able to "purchase" the build.
| / 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* | |
| // select hosting | |
| // select your project |
| // 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 | |
| // *type build as your public directory* |
| # Static Site Deployment | |
| These instructions will lead you through how to deploy a static website on firebase | |
| ## Instructions | |
| 1. Fork and clone this repo | |
| 1. Change into the `practice directory` from your command line | |
| 1. Sign up for an account on [Firebase](https://firebase.google.com/). | |
| 1. In your terminal, install the Firebase CLI tools |
| * Life Lesson #1 - Learn by Doing | |
| * Just build shit, then build more shit and after that build more shit. | |
| * Don't be afraid to break things. | |
| * Life Lesson #2 - Make Friends and Be Nice to _Everyone_ | |
| * You never know when they'll be able to help you with something | |
| * And if they don't, you made a friend out of it, get over yourself | |
| * Life Lesson #3 - It's much harder to say no to a working thing/prototype than it is to say no to an idea of a thing | |
| * No one _asked me_ to automate the process. | |
| * I did not ask for permission to do it, I just _did it_ | |
| * Life Lesson #4 - Doing _nothing_ for money is not rewarding |
*ngIf - structural directive (meaning it affects what's output in the DOM) that's conditional on a expression evaluating to true
*ngFor - structural directive (meaning it affects what's output in the DOM) that's conditional on how many elements to loop through and render there are.
lifecycle hooks - as Angular initializes, it goes through certain phases.
First is ngOnChanges - when properties receive new values
ngOnInit - runs after the constructor - once component is initialized (but not added to the DOM) - basically once the object's created
^u # Erases input from current location to beginning of line.
^k # Erases input from the current location to the end of the line.
^a # Jump to beginning of line.
^e # Jump to end of line.
^z # Suspend a program that may be running and gives you another shell prompt.
| const apiUrl = './dinosaurs.json' | |
| // constructor stuff | |
| componentDidMount() { | |
| this.fetchProfiles() | |
| } | |
| async fetchProfiles() { | |
| const response = await fetch(apiUrl) |