This project is a demo for the fullstack development with following technique
- Angular (front-end)
- Golang (back-end)
- Docker (image)
- K8S (deployment pod)
- Build a golang backend service by using echo framework
- Port backend service into image
- Port image into K8S
- Add front-end by using angular framework
- clone the project
git clone https://github.com/joshsyu/fullstack-practice.git
- checkout the branch which you try to practice, such as angular
git checkout angular
- checkout the tag (commit) which you try to start, such as lecture1-create-angular-project
git checkout lecture1-create-angular-project
- checkout to new branch for your own practice, such as my-practice-on-angular
git checkout -b my-practice-on-angular
- git clone Download the whole project from remote url (default download from master branch)
git clone url
git clone https://github.com/joshsyu/fullstack-practice.git
- git add Add changes into staging for commit
git add "modified file"
- git remove Remove the git add files
git remove "added file"
- git commit Commit the changes and give the changes with some reason
git commit -m "Why I need to do this"
- git push Push(Synchronize) local changes to remote repo, -u means upstream local change with remote branch
git push -u origin branch
git push -u origin master
git push
- git pull Synchronize changes from remote repo
git pull
- git remote add Set up a remote repo for uploading files to code server
git remote add https://github.com/joshsyu/fullstack-practice.git
- git remote set-url Change a remote repo url
git remoate set-url origin https://github.com/joshsyu/fullstack-practice.git
- git log Watch the change history (each commit)
git log
- git checkout With -b able to create a new branch and move to it. With commit able to move the current repo back to specified commit (un-attached) Checkout branch is to move the current repo to the other branch or un-attached commit state to newest commit on the branch
git checkout -b new-branch
git checkout branch
git checkout commit
- git reset Reset the current repo to specified commit (state)
git reset commit
- git branch Delete unused branch
git branch -D branchName
- docker build -t tag .
- docker run image:tag
- docker exec -it container command
- kubectl apply -f *.yaml
- kubectl get pods/deployments/statefulsets/svc/pvc
- kubectl describe pods abcd
- kubectl logs pods -c container
- kubectl exec -it pod -- command
# Download nodejs
export PATH="$PATH:NODEPATH"
npm install -g @angular/cli@latest
- ng new project
- ng new component
- ng build
- ng serve --port 8900
- ng add @angular/material
ag-grid-community ag-grid-angular @angular/flex-layout
- go build
- go run
- go mod init
- go mod download
- go mod tidy
- go get -u url
- go tool test