Giter VIP home page Giter VIP logo

fib_logging_system's Introduction

django-rest-tutorial

How to run

  • Install project dependencies
$ pip3 install -r requirements.txt
  • Migrate database tables
$ cd REST/
$ python3 manage.py migrate
  • Run the REST server
$ cd REST/
$ python3 manage.py runserver 127.0.0.1:8080
  • Run the MQTT broker
$  docker run -d -it -p 1883:1883 -v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf eclipse-mosquitto
                       
  • Run the gRPC Fibonacci server
$ cd gRPC/Fib
$ python3 fib_server.py 
  • Run the gRPC Log server (Be sure to run the MQTT broker first)
$ cd gRPC/Log
$ python3 log_server.py 
  • Note that if the build/ directory doesn't exist in any server directory (gRPC/Fib/, REST/ ...) run make before running the server

Using curl to perform client request

  • POST request
  • e.g. if order = 4
$ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8080/rest/fibonacci/ -d "{\"order\":\"4\"}"
  • GET request
$ curl 127.0.0.1:8080/rest/logs

fib_logging_system's People

Contributors

wwfug avatar

Watchers

 avatar

Forkers

nicholasloh

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.