Skip to content

Commit

Permalink
Merge pull request #291 from oliversalzburg/patch-1
Browse files Browse the repository at this point in the history
Use appropriate handler
  • Loading branch information
pmcnr-hx authored Jun 1, 2017
2 parents 268423d + f4c4fbb commit cbfa8e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions documentation/suggested-project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jsonApi.start();
The idea is to stick to having one resource per file and stick to pure config. Each file should do nothing more than define a resource. Handlers should be referenced from the `../handlers` folder, which enables us to easily abstract functionality by sharing features amongst handlers. Resource files are effectively defining your routing layer.

```javascript
var commentHandler = require("../handlers/commentHandler.js");
var photosHandler = require("../handlers/photosHandler.js");

jsonApi.define({
resource: "photos",
handlers: memoryHandler,
handlers: photosHandler,
attributes: {
title: jsonApi.Joi.string()
url: jsonApi.Joi.string().uri()
Expand Down

0 comments on commit cbfa8e0

Please sign in to comment.