Эх сурвалжийг харах

- 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 жил өмнө
parent
commit
9b7b54469a

+ 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);