Code Monkey home page Code Monkey logo

todo-2's Introduction

todo-list-service

Todo List Service is a GO API service which serves Todo data.

Requests

  • Add a Todo task
curl -X POST -H "Content-Type: application/json" -d '{                                                                                           
  "task": "Fix bug 130320",
  "endDate": "2020-03-20",
  "labels": "Dev",
  "comm": "In progress"
  "uid":1,
}' http://127.0.0.1:8080/api/v1/todo/
  • Update a Todo task
curl -X PUT -H "Content-Type: application/json" -d ~~'{~~
  "task": "Fix bug 130320",
  "duedate": "2020-03-20",
  "labels": "QA",
  "comments": "Verification"
}' http://127.0.0.1:8080/todo/{TID}
  • Read all Todo tasks
curl -X GET -H "Content-Type: application/json"     http://127.0.0.1:8080/todo/
  • Read a specific Todo task
curl -X GET -H "Content-Type: application/json"     http://127.0.0.1:8080/todo/{TID}
  • Delete a specific Todo task
curl -X DELETE -H "Content-Type: application/json"  http://127.0.0.1:8080/todo/{TID}

Docker

docker pull harik8/todo:v1.0.0

Local Run

  • Install kind

  • kind create cluster

  • kubectl create ns mongodb

  • kubectl create ns todo

  • helm install mongodb stable/mongodb -n mongodb

  • export MONGODB_ROOT_PASSWORD=$$(kubectl get secret --namespace mongodb mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)

  • kubectl create secret generic mongo-cred --from-literal=MONGO_PASSWORD=${MONGODB_ROOT_PASSWORD} -n todo

  • git clone https://github.com/harik8/sg-kube-deployer.git

  • cd sg-kube-deployer

  • kubectl apply -f manifests/todo/

  • kubectl port-forward po/<todo_pod_name> -n todo 8080:8080

todo-2's People

Contributors

harik8 avatar yongliu1992 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.