-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,237 additions
and
783 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
.idea | ||
node_modules | ||
dist | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"presets": ["es2015", "stage-0"], | ||
"plugins": ["transform-class-properties"] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PORT= | ||
IP= | ||
NODE_ENV= | ||
MONGODB_URI= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea | ||
node_modules | ||
dist | ||
coverage | ||
server/config/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"expr": true, | ||
"node": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"latedef": "nofunc", | ||
"newcap": true, | ||
"noarg": true, | ||
"undef": true, | ||
"smarttabs": true, | ||
"asi": true, | ||
"debug": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": ".jshintrc", | ||
"globals": { | ||
"describe": true, | ||
"it": true, | ||
"before": true, | ||
"beforeEach": true, | ||
"after": true, | ||
"afterEach": true, | ||
"expect": true, | ||
"assert": true, | ||
"sinon": true | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
'use strict'; | ||
|
||
/** | ||
* @description Service route Controller | ||
* @param ServiceController | ||
* @description Express Framework Router | ||
* @param Router | ||
*/ | ||
import ServiceController from './service.controller'; | ||
import { Router } from 'express'; | ||
|
||
/** | ||
* @class ServiceRoutes | ||
* @classdesc Class that represents Service routes | ||
* @exports ServiceRoutes | ||
* @default | ||
* @description Service route Controller | ||
* @param ServiceController | ||
*/ | ||
export default class ServiceRoutes { | ||
import * as ServiceController from './service.controller'; | ||
|
||
/** | ||
* @function init | ||
* @description Init Service routes for Express router | ||
* @param {Router} router - Express Framework Router | ||
* @static | ||
*/ | ||
static init(router) { | ||
let router = new Router(); | ||
|
||
// /api/services routes configs | ||
router.route('/services') | ||
.get(ServiceController.list) | ||
.post(ServiceController.create); | ||
router.get('/', ServiceController.index); | ||
router.get('/:id', ServiceController.show); | ||
router.post('/', ServiceController.create); | ||
router.put('/:id', ServiceController.update); | ||
router.patch('/:id', ServiceController.update); | ||
router.delete('/:id', ServiceController.destroy); | ||
|
||
// /api/services/:id routes configs | ||
router.route('/services/:id') | ||
.get(ServiceController.show) | ||
.put(ServiceController.update) | ||
.delete(ServiceController.delete); | ||
} | ||
} | ||
/** | ||
* @description Configured router for Service Routes | ||
* @exports router | ||
* @default | ||
*/ | ||
export default router; |
Oops, something went wrong.