REST API in Node.js and Express.js to test AMEX, Discover, MasterCard and Visa cards. The API takes the card number and defines the card type and gets validated by the Luhn Algorithm.
Simple front-end in React providing a form that will pass the input through the API and return its results back to you.
- Backend: Run
npm install
in this folder to install all dependencies andnpm start
to start the server. - Frontend: Run
npm install
in this folder to install all dependencies andnpm start
to start the ReactJS app.
-
URL
/numberValidation/:number
-
Method:
GET
- Limit the card number field to 16 numbers only
- Check if Expiry date is in future