Skip to content

This is a simple Node.js API using Express.js Promises, ES6, Mocha & Chai

Notifications You must be signed in to change notification settings

tiomno/small-nodejs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Test :: Small Node.js API

Build Status

This is my approach to the solution of a simple Node.js API.

For the completion of this task, I decided to use Express.js and Mocha +Chai for unit testing.

Requirements

  • Node.js 7.6+ and NPM

Heroku

The API can be consumed accessing the heroku subdomain https://small-nodejs-api.herokuapp.com/

Possible error responses are
  • When not matching URL is found
{
    "error": "Not Found!!!"
}
  • When a malformed JSON structure is received
{
    "error": "Could not decode request: JSON parsing failed"
}
  • When there is no payload property in the request
{
    "error": "The payload of properties is missing in the request."
}

To run the tests, from the root of the repo:

npm test

License

https://www.isc.org/downloads/software-support-policy/isc-license/

About

This is a simple Node.js API using Express.js Promises, ES6, Mocha & Chai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published