A react app that parses API provided formula, does calculation, and sends result to the API
[
{
"formula": "a+b+2+x"
},
{
"formula": "c-d+v"
}
]
[
{
"formula": "a+b+2+x",
"values": {
"a": 2,
"b": 3,
"x": 4
},
"result": 11
},
{
"formula": "c-d+v",
"values": {
"c": 10,
"d": 5,
"v": 4
},
"result": 9
}
]
- Make sure to have the node version
v10.15.1
and npm version6.4.1
. Install the latestlts
via nvm. - Backend server must be kept running to successfully run the frontend. Open terminal and
cd
tobackend
directory. - run
npm i
- run
npm start
- In another terminal/tab
cd
tofrontend
directory. - run
npm i
- run
npm start
- fill the inputs and hit
submit
button. - monitor the terminal where
backend
is running. The result will be printed in the terminal. - run
npm test
to run test. This has no connection with thebackend
.
** frontend
uses create-react-app.