- Create a simple RESTful CRUD API using the NodeJS Express framework that will implement the service as described in the Swagger file (swagger.yml).
- The framework must dynamically load the Swagger file to create its routes. You can load the Swagger file through https://editor.swagger.io to understand the API requirements.
- Feel free to add more properties in the Swagger file using the
x-*notation to suit your needs (ie. routing requests to controllers and actions). - You can use the provided package.json file to start off your project.
- Make a public fork of this repository and email the link to info@pragmanila.com.
- Implement in NodeJS Express Framework.
- Routes must be read from the swagger file (ie. routes are not hardcoded).
- Use MongoDB for data persistence.
- Validate all inputs. All input errors must be reported during a request, meaning the whole request input must be validated before sending out a respose (ie. server must respond that an email is not unique and a name is required)
idmust exist when reading, updating, and deletingnameandemailmust exist when creatingemailmust be unique
- Response headers and http codes must be correct.
- ES6
- Promise
- Sensible and clear code abstraction
- Code potential for scalability
- NPM script (
npm test) for basic code linting using JSHint (www.jshint.com)