Upgrade to Pro — share decks privately, control downloads, hide ads and more …

お盆にポータルサイトをSPAでリリースした

Avatar for hatappi hatappi
August 24, 2016

 お盆にポータルサイトをSPAでリリースした

Angular2とRails5 api modeで作成したポータルサイトの話

Avatar for hatappi

hatappi

August 24, 2016
Tweet

More Decks by hatappi

Other Decks in Technology

Transcript

  1. HAL

  2. { "_links": { "self": { "href": "/comments/1" } }, "id":

    1, "message": "LTେձʹࢀՃͯ͠·͢", "_embedded": { "user": { "_links": { "self": { "href": "/users/7" } }, "id": 7, "name": "yusaku.hatanaka" } } }
  3. { "data":{ "id":"1", "type":"users", "links":{ "self":"http://hoge.com/users/1" }, "attributes":{ "name":"yusaku.hatanaka" },

    "relationships":{ "comments":{ "links":{ "self":"http://hoge.com/users/1/relationships/comments", "related":"http://hoge.com/users/1/comments" }, "data":{ "type":"comments", "id":"8" } } }, "included":[ { "id":"8", "type":"comments", "links":{ "self":"http://hoge.com/comments/8" }, "attributes":{ "context":"LTେձʹࢀՃͯ͠·͢" }, "relationships":{ } } ] } }
  4. JSON:APIͱHAL • HAL • intergent draftʹೖ͍ͬͯΔ • AWSͷAPIGatewayͰ࢖༻͞Ε͍ͯΔ࣮੷ • JSON:API

    • error࣌ͷϨεϙϯεͳͲͷݴٴ΋͋Δ • ձࣾͷϓϩμΫτͰ࢖༻͞Ε͍ͯΔ࣮੷ • GET͚ͩͰͳ͘ɺPOST΍DELETEͳͲCRUD΁ͷݴٴ΋͋Δ