{"id":18725576,"url":"https://github.com/reljicd/play-framework-blog","last_synced_at":"2025-04-12T16:12:18.814Z","repository":{"id":94100391,"uuid":"114552739","full_name":"reljicd/play-framework-blog","owner":"reljicd","description":"Simple blog web app made using Play Framework + Twirl","archived":false,"fork":false,"pushed_at":"2018-01-03T11:52:07.000Z","size":72,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T10:36:27.483Z","etag":null,"topics":["blog","docker","dockerfile","ebean","guice","h2","h2-database","java","java8","java8-optionals","junit","play-framework","playframework","sbt","stream-api","twirl","twirl-templates"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reljicd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-17T16:48:19.000Z","updated_at":"2024-12-26T14:35:34.000Z","dependencies_parsed_at":"2023-03-12T11:48:10.807Z","dependency_job_id":null,"html_url":"https://github.com/reljicd/play-framework-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fplay-framework-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fplay-framework-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fplay-framework-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reljicd%2Fplay-framework-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reljicd","download_url":"https://codeload.github.com/reljicd/play-framework-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594143,"owners_count":21130313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","docker","dockerfile","ebean","guice","h2","h2-database","java","java8","java8-optionals","junit","play-framework","playframework","sbt","stream-api","twirl","twirl-templates"],"created_at":"2024-11-07T14:10:50.836Z","updated_at":"2025-04-12T16:12:18.807Z","avatar_url":"https://github.com/reljicd.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Play Framework Blog Demo\n\n## About\n\nThis is a demo project for practicing Play Framework + Twirl. \nThe idea was to build some basic blogging platform.\n\nIt was made using **Java 8**, **Play Framework**, **Twirl**, **Ebean**, **Guice**. \nDatabase is in memory **H2**.\nTesting is done using **Junit**.\n\nThere is a login and registration functionality included.\n\nUser has his own blog page, where he can add new blog posts. \nEvery authenticated user can comment on posts made by other users.\nHome page is paginated list of all posts.\nNon-authenticated users can see all blog posts, but cannot add new posts or comment.\n\n## How to run\n\nYou can run the application from the command line with [SBT](http://www.scala-sbt.org/download.html). \n\n### Default\n\nGo to the root folder of the application and type:\n```bash\n$ cd my-first-app\n$ sbt run\n```\n\n### Using Play console\n\nAlternatively, you can run Play console. Change to the directory of your project, and run sbt:\n```bash\n$ cd my-first-app\n$ sbt\n``` \nAnd you will see something like:\n```bash\n[info] Loading global plugins from /Users/play-developer/.sbt/0.13/plugins\n[info] Loading project definition from /Users/play-developer/my-first-app/project\n[info] Updating {file:/Users/play-developer/my-first-app/project/}my-first-app-build...\n[info] Resolving org.fusesource.jansi#jansi;1.4 ...\n[info] Done updating.\n[info] Set current project to my-first-app (in build file:/Users/play-developer/my-first-app/)\n[my-first-app] $\n```\nTo run the current application in development mode, use the run command:\n```bash\n[my-first-app] $ run\n```\n\n### Docker\n\nIt is also possible to run the blog app using Docker:\n\nBuild the Docker image:\n```bash\n$ docker build -t reljicd/play-blog -f docker\\Dockerfile .\n```\n\nRun the Docker container:\n```bash\n$ docker run --rm -i -p 9000:9000 reljicd/play-blog\n```\n\n#### Helper Script\n\nIt is possible to run all of the above with helper script:\n\n```bash\n$ chmod +x scripts/run_docker.sh\n$ scripts/run_docker.sh\n```\n\n## Post Installation\n\nThe application should be up and running within a few seconds.\n\nGo to the web browser and visit `http://localhost:9000/blog`\n\nUser username: **user**\n\nUser password: **password**\n\n## How to test\n\nThe location for tests is in the **test** folder. \n\n### Using SBT console\n\nYou can run tests from the SBT console.\nChange to the directory of your project, and run *sbt*:\n```bash\n$ cd my-first-app\n$ sbt\n``` \nTo run all tests, run *test*:\n```bash\n[my-first-app] $ test\n```\nTo run only one test class, run *testOnly* followed by the name of the class i.e. *testOnly my.namespace.MyTest*:\n```bash\n[my-first-app] $ testOnly my.namespace.MyTest\n```\nTo run only the tests that have failed, run *testQuick*:\n```bash\n[my-first-app] $ testQuick\n```\nTo run tests continually, run a command with a tilde in front, i.e. *~testQuick*:\n```bash\n[my-first-app] $ ~testQuick\n```\nTo access test helpers such as FakeApplication in console, run *test:console*:\n```bash\n[my-first-app] $ test:console\n```\n\nTesting in Play is based on [SBT](http://www.scala-sbt.org/download.html), and a full description is available in the [testing documentation](http://www.scala-sbt.org/release/docs/Testing.html).\n\n### Default\n\nGo to the root folder of the application and type:\n```bash\n$ cd my-first-app\n$ sbt test\n```\n\n### Docker\n\nIt is also possible to run tests using Docker:\n\nBuild the Docker image:\n```bash\n$ docker build -t reljicd/play-blog -f docker\\Dockerfile .\n```\n\nRun the Docker container:\n```bash\n$ docker run --rm reljicd/play-blog test\n```\n\n## Helper Tools\n\n### H2 Database web interface\n\nYou can browse the contents of your database by typing *h2-browser* at the sbt shell:\n```bash\n$ cd my-first-app\n$ sbt run\n[my-first-app] $ h2-browser\n```\nAn SQL browser will run in your web browser.\n\nIn field **JDBC URL** put \n```\njdbc:h2:file:$WORKING_DIRECTORY/play;AUTO_SERVER=TRUE\n```\nwhere *$WORKING_DIRECTORY* should be substituted with the full path of app directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freljicd%2Fplay-framework-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freljicd%2Fplay-framework-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freljicd%2Fplay-framework-blog/lists"}