Skip to content

arashbm/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calculator

API

GET /calculus with single mandatory parameter query, base64 encoded of a valid infix expression. The only supported operators are + (binary operator), - (binary operator), * and / ATM.

Succesful response is a status 200 with JSON body {error: false, result: RESULT} where RESULT is the result of the infix expression.

Invalid infix expression will result in a status 400 with body {error: true, message: MESSAGE} where message is the respective error message.

Build & Run

$ cd calculator
$ ./sbt
> jetty:start
> browse

If browse doesn't launch your browser, manually open http://localhost:8080/ in your browser.

About

Infix expression evaluation with Scalatra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published