Read JSON from static file


Hi guys!

I would like some help here.

I’m trying to read a static JSON file in order to test my Front End.

I’m using JSONAPIAdapter. I created the Serializers and the Adapter and pointed to the url for the JSON file, but the output of the url in Ember Inspect is being “localhost: 4200 / api / timelines” and is returning Not Found.

Could someone help me understand what the concept of Ember I did not understand very well when I tried to set up?

That’s my files:


import DS from 'ember-data';
export default DS.JSONAPISerializer.extend({
  keyForAttribute: function(attr) {
    return Ember.String.underscore(attr);


import DS from 'ember-data';

export default DS.JSONAPIAdapter.extend({
   namespace: "api/",
   url: "timelines.json"


import DS from "ember-data";

export default DS.Model.extend({
    channel: DS.attr('string')


import Ember from 'ember';
import config from './config/environment';

const Router = Ember.Router.extend({
  location: config.locationType
}); {
    this.route('timelines', { path: '/' });

export default Router;


import Ember from 'ember';

export default Ember.Route.extend({
    model () {


  "data": [{
    "type": "timelines",
    "id": "1",
    "attributes": {
      "channel": "facebook"
  }, {
    "type": "timelines",
    "id": "2",
    "attributes": {
      "channel": "instagram"


Take a look at my answer to a similar question. Hope that helps!