GithubHelp home page GithubHelp logo

prateekatknoldus / surge-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eldarkz16/surge-samples

0.0 0.0 0.0 51 KB

A collection of example apps using Surge

License: Apache License 2.0

Scala 8.81% Shell 91.19%

surge-samples's Introduction

surge-samples

A collection of example apps using Surge

You need to have a running kafka server. Read this guide to quickly get a kafka server running on your system.

You then need to create two topics, one for events and another for state:

bin/kafka-topics.sh --create --topic bank-account-events --bootstrap-server localhost:9092 --partitions 3 --replication-factor 1

bin/kafka-topics.sh --create --topic bank-account-store --bootstrap-server localhost:9092 --partitions 3 --replication-factor 1

You can create a bank account this way:

curl -X POST -H "content-type: application/json" \ 
-i http://localhost:8080/bank-accounts/create \ 
--data '{"accountNumber":"4317c6cf-438c-4f36-8391-7b6b36a0e2d9","accountOwner":"foobar","securityCode":"verysecret","initialBalance":100.0}'

And retrieve the balance of an account this way: curl -X GET http://localhost:8080/bank-accounts/4317c6cf-438c-4f36-8391-7b6b36a0e2d9

surge-samples's People

Contributors

satyender071 avatar eldarkz16 avatar jeffboutotte avatar xd-dante avatar prateekatknoldus avatar rohan-sircar 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.