소스 검색

- 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 년 전
부모
커밋
9b7b54469a
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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);