Selaa lähdekoodia

- 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 6 vuotta sitten
vanhempi
commit
9b7b54469a
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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
 ## 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
 ## Examples
 
 

+ 2 - 2
api/routes/bDateRoutes.js

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