Coder Social home page Coder Social logo

gevent-store's Introduction

Event Store Microservice

ATTENTION: this setup assumes that the code is always executed inside a Docker container and is not meant for running code on the host machine directly.

API Spec: https://implementing-microservices.github.io/gevent-store/

Quickstart

  1. Build project and start inside a container:

    > make
    
  2. Check logs to verify things are running properly:

    > make logs
    

    If you see Starting microservice on internal port as the last entry in the log things should be A-OK. However, the port indicated there is internal to the Docker container and not a port you can test the service at. You need to run make ps to detect the external port (see below).

  3. Find the port the server attached to by running:

    > make ps
    

    which will have an output that looks something like

      Name                   Command               State            Ports
    --------------------------------------------------------------------------------
    ms-gevent-api   ./wait-for.sh -t 60 ms-gev ...   Up      0.0.0.0:32773->3535/tcp
    

    Whatever you see instead of 0.0.0.0:32773 is the host/port that your microservice started at. Type it in your browser or Postman or another HTTP client of your choice to verify that the service is responding.

Usage

# run:
> make [start]

# stop:
> make stop

# follow logs:
> make logs

# show container status:
> make ps

# jump into the Docker container
> make shell

# To add a dependency, just modify go.mod
# and hot reloader will do the rest! THAT EASY

# build a release (production-appropriate) Docker image "from scratch":
> make build-release

# Run the release build:
> make run-release

License

MIT

gevent-store's People

Contributors

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