Git Product home page Git Product logo

stephen-grider-ticketing-system's Introduction

Steps to initialize a new microservice in js

  1. Create a new directory
  2. npm init -y
  3. install dependencies (e.g. npm install typescript ts-node-dev express @types/express)
  4. tsc --init (if working with typescript)
  5. Set up a start script within package.json
    • "start": "nodemon index.js" if on js
    • "start": "ts-node-dev src/index.ts" if on ts

Next steps to setup docker/kubernetes

  1. Setup Dockerfile & .dockerignore
  2. Ensure docker can successfully build and run the image
  3. Setup k8s infra (basic deployment and clusterip)
  4. Setup skaffold config to copy any code changes to code files to the correct container and rebuild infrastructure on k8s file changes
  5. Test infra with 'skaffold dev'
  6. Setup a basic request/response endpoint in the microservice for testing
  7. Create either a nodeport(localdev) or an ingress controller for access from outside the cluster(kubernetes.github.io/ingress-nginx)
  8. If using an ingress controller, make sure to change your /etc/hosts file for local development
  9. Chrome will probably stop access to the site locally due to the nginx self signed certificate. To get around that in development, click anywhere in the chrome webpage and type 'thisisunsafe' to be let through

stephen-grider-ticketing-system's People

Contributors

rjesquivias 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.