Code Monkey home page Code Monkey logo

fullstack-practice's Introduction

Full stack practice

This project is a demo for the fullstack development with following technique

  • Angular (front-end)
  • Golang (back-end)
  • Docker (image)
  • K8S (deployment pod)

Step

  1. Build a golang backend service by using echo framework
  2. Port backend service into image
  3. Port image into K8S
  4. Add front-end by using angular framework

How to use this repo

  1. clone the project
git clone https://github.com/joshsyu/fullstack-practice.git
  1. checkout the branch which you try to practice, such as angular
git checkout angular
  1. checkout the tag (commit) which you try to start, such as lecture1-create-angular-project
git checkout lecture1-create-angular-project
  1. checkout to new branch for your own practice, such as my-practice-on-angular
git checkout -b my-practice-on-angular

Git

Useful command

  • 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

Useful command

  • docker build -t tag .
  • docker run image:tag
  • docker exec -it container command

K8S

Useful 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

Angular

Install angular cli

# Download nodejs
export PATH="$PATH:NODEPATH"
npm install -g @angular/cli@latest

Useful command

  • ng new project
  • ng new component
  • ng build
  • ng serve --port 8900
  • ng add @angular/material

Useful package

ag-grid-community ag-grid-angular @angular/flex-layout

Angular Upgrade

Reference

Angular Schematics

Reference

Golang

Useful command

  • go build
  • go run
  • go mod init
  • go mod download
  • go mod tidy
  • go get -u url
  • go tool test

fullstack-practice's People

Contributors

joshsyu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.