Node api backend built on the top of express js to compute the conditions passed.
The easiest way to get started is to clone the repository:
# Get the latest snapshot
git clone https://github.com/alirazaalvi/Compute.git myproject
# Change directory
cd myproject
# Install NPM dependencies
npm install
# Start the application
npm run dev
# Start the application for prod
npm start
# Access the application
http://localhost:4000
# Test
npm test
# Lint
npm run lint
# Format
npm run format
# test
npm test
# Coverage
npm run coverage
| api/api | Contains all of the api logic. | | .eslintrc | Rules for eslint linter. | | .gitignore | Folder and files ignored by git. | | server.ts | The main application file. | | package.json | NPM dependencies. | | package-lock.json | Contains exact versions of NPM dependencies in package.json. |
Returns json response of the result.
-
URL
/api/v1/compute
-
Method:
POST
-
POST Payload
{ "&&": [ { "==": ["a", "a"] }, { "!": {"==": [1, 2] } }] }
-
Success Response:
- Code: 200
Content:true|false
- Code: 200
-
Error Response:
- Code: 400
Content:Missing expression
- Code: 400