Sign inSign up

gallegogt/lwan-calculator

By gallegogt

•Updated almost 11 years ago

lwan-calculator-api C/C++

Image
0

385

gallegogt/lwan-calculator repository overview

lwan-calculator-api

⁠Dependencies

1- lwan Web Server⁠

⁠Build dependencies
  1. Lwan
~$ git clone https://github.com/lpereira/lwan.git
~$ cd lwan
~/lwan$ mkdir build
~/lwan$ cd build
~/lwan/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
~/lwan/build$ sudo make install

2.- Include in source json.h from lwan/techempower source and (utf8)[http://ufpr.dl.sourceforge.net/project/utfcpp/utf8cpp_2x/Release%202.3.4/utf8_v2_3_4.zip⁠]

⁠You will need:

cmake >= 2.8.0
gcc >= 4.7

⁠Build

~$ git clone https://github.com/gallegogt/lwan-calculator-api.git
~$ cd lwan-calculator-api
~/lwan-calculator-api$ mkdir build
~/lwan-calculator-api/$ cd build
~/lwan-calculator-api/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
~/lwan-calculator-api/build$ make

⁠Usage

⁠Server
~$ cd lwan-calculator-api/build/bin
~lwan-calculator-api/build/bin$ ./calculator-server
⁠Client
$ curl --data-urlencode "query={\"op\": \"*\", \"ops\": [3, 1,5,6,7,8,9]}" http://localhost:8888

⁠Docker

Get the docker container

docker pull gallegogt/lwan-calculator

Use

docker run -p 8888:8888 gallegogt/lwan-calculator

Tag summary

Content type

Image

Digest

sha256:ba4392dd7…

Size

252.9 MB

Last updated

almost 11 years ago

docker pull gallegogt/lwan-calculator:1.1