Skip to content

KOCNS1/InfixToRPN-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Google like calculator using RPN algorithm


The back

Express / Typescript API running on port 3001

One single route
const res = await fetch('http://localhost:3001/calculator', {
  method: 'POST',
  body: JSON.stringify({ infix: result }),
  headers: {
    'Content-Type': 'application/json',
  } as unknown as Headers,
});

Request Body:

{
  "infix": "2 + 2"
}

Request Response:

{
  "Result": "4",
  "Postfix": "2 2 +"
}

To run the back

cd back && npm i &&  npm run dev

To run the front

cd front && npm i && npm run dev

To run via Docker

docker-compose up --build
# Server started on http://localhost:3001
# Client started on http://localhost:3000/

To run the tests

cd back && npm run test

### The front

React app using Vite, TailwindCSS and React context

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published