Ver Fonte

- Refactoring: Avoid global require (which would be repeated on each function call without need as only using functions)
- Docs: Simplify example with `npm start`

Brett Zamir há 6 anos atrás
pai
commit
9b7b54469a
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 1 1
      README.md
  2. 2 2
      api/routes/bDateRoutes.js

+ 1 - 1
README.md

@@ -12,7 +12,7 @@ Given a date from the Gregorian calendar defined via POST data, returns the corr
 
 ## Running
 
-To launch the API server, simply navigate to the main folder and type 'npm run start'.
+To launch the API server, simply navigate to the main folder and type `npm start`.
 
 ## Examples
 

+ 2 - 2
api/routes/bDateRoutes.js

@@ -1,7 +1,7 @@
 'use strict';
-module.exports = function(app) {
-  var bDate = require('../controllers/bDateController');
+var bDate = require('../controllers/bDateController');
 
+module.exports = function(app) {
   // API test
   app.route('/test')
     .get(bDate.test);