Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJs Collection code JSON response error #11

Open
paboulos opened this issue Sep 14, 2015 · 1 comment
Open

NodeJs Collection code JSON response error #11

paboulos opened this issue Sep 14, 2015 · 1 comment

Comments

@paboulos
Copy link

A GET request to the express URL http://localhost:3000/collection/tasks/ receives a SyntaxError: JSON.parse: unexpected non-whitespace in the application/json response body.

"items" : [

  {
    "href" : "http://localhost:3000/collection/tasks/task3",
    "data" : [
      {"name" : "description", "value" : "This is my third task.", "prompt" : "Description"},
      {"name" : "completed", "value" : false, "prompt" : "Completed"},
      {"name" : "dateDue", "value" : "2011-11-30", "prompt" : "Date Due"}      
    ]
  }
  ,

  {
    "href" : "http://localhost:3000/collection/tasks/task2",
    "data" : [
      {"name" : "description", "value" : "This is my second task.", "prompt" : "Description"},
      {"name" : "completed", "value" : true, "prompt" : "Completed"},
      {"name" : "dateDue", "value" : "2011-12-29", "prompt" : "Date Due"}      
    ]
  }
  ,

  {
    "href" : "http://localhost:3000/collection/tasks/task1",
    "data" : [
      {"name" : "description", "value" : "This is my first task.", "prompt" : "Description"},
      {"name" : "completed", "value" : false, "prompt" : "Completed"},
      {"name" : "dateDue", "value" : "2011-12-31", "prompt" : "Date Due"}      
    ]
  }


]
@paboulos
Copy link
Author

The files app.js is pointing to the wrong template and layout.ejs needs to include the correct partial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant