Coder Social home page Coder Social logo

fossa-demo's Introduction

fossa-demo

RESTful server demo using Fossa library + picoTCP + picotcp-bsd

NOTE: This demo runs picoTCP and the complete application as a "Sandbox" ELF application inside a Linux application. It will use the TAP device driver to create a virtual networking device, which you should assign an IP address. this was done because demonstrating the code this way is very easy, and allows anyone to evaluate it, without any specific hardware. This code can very well run on an actual embedded target, using the exact same code as demonstrated here. This very code has been run on NXP LPC, ST Micro STM32Fxxx, and TI Stellaris microcontrollers already.

To build:

$ git clone [email protected]:tass-belgium/fossa-demo.git
$ cd fossa-demo
$ git submodule init
$ git submodule update
$ make

To run the sandbox application:

$ sudo ./out/image.elf

This needs to run as root, because it will create a TAP device. It will be configured with the 192.168.2.150/24 IP. The other end of the TAP (Linux side) will have to be configured in the same subnet. One way to do this is:

$ sudo ifconfig tap0 192.168.2.1/24

Now you can check the uptime here:

http://192.168.2.150/api/v1/uptime

or try the "sum" api that will return the result in JSON:

http://192.168.2.150/api/v1/sum?n1=5&n2=10

fossa-demo's People

Contributors

maximevince avatar

Watchers

 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.