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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Dusan' | |
}); |
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
/*jshint unused:false*/ | |
import DS from 'ember-data'; | |
export default DS.RESTAdapter.extend({ | |
try: 0, | |
findAll(modelName, query, params, modelClass) { | |
// we return different records | |
this.set("try", this.get("try") + 3); | |
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
{ | |
"data": { | |
"email": "dusan.stanojevic.cs@gmail.com" | |
} | |
} |
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
eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImVtYWlsIjoiZHVzYW4uc3Rhbm9qZXZpYy5jc0BnbWFpbC5jb20ifX0.fcsKMrL5Vvo5ejV4wVrVLiBhnzqioX0iLrr8Ya7D6Rc |
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
eyJkYXRhIjp7ImVtYWlsIjoiZHVzYW4uc3Rhbm9qZXZpYy5jc0BnbWFpbC5jb20ifX0 |
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
CREATE DATABASE bookstore; |
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
CREATE TABLE `books` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`title` varchar(64) DEFAULT NULL, | |
`description` text, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
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
name := """play-rest-book-db""" | |
version := "1.0-SNAPSHOT" | |
lazy val root = (project in file(".")).enablePlugins(PlayJava) | |
scalaVersion := "2.12.2" | |
libraryDependencies += guice |
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
...... | |
play.modules { | |
# By default, Play will load any class called Module that is defined | |
# in the root package (the "app" directory), or you can define them | |
# explicitly below. | |
# If there are any built-in modules that you want to disable, you can list them here. | |
#enabled += my.application.Module | |
# If there are any built-in modules that you want to disable, you can list them here. |
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
package books; | |
import com.google.inject.Inject; | |
import play.db.Database; | |
import play.libs.Json; | |
import play.mvc.Controller; | |
import play.mvc.Result; | |
public class BookController extends Controller { |
OlderNewer