{"id":13695699,"url":"https://github.com/lloydmeta/slim-play","last_synced_at":"2026-02-27T18:50:47.568Z","repository":{"id":35414330,"uuid":"39679099","full_name":"lloydmeta/slim-play","owner":"lloydmeta","description":"Slim Play app","archived":false,"fork":false,"pushed_at":"2020-04-11T08:44:26.000Z","size":26,"stargazers_count":76,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T21:43:32.934Z","etag":null,"topics":["play","play-framework","rest","router","scala","slim-framework","webapp"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lloydmeta.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}},"created_at":"2015-07-25T09:15:48.000Z","updated_at":"2023-08-23T12:57:01.000Z","dependencies_parsed_at":"2022-09-17T15:02:57.352Z","dependency_job_id":null,"html_url":"https://github.com/lloydmeta/slim-play","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/lloydmeta%2Fslim-play","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydmeta%2Fslim-play/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydmeta%2Fslim-play/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydmeta%2Fslim-play/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lloydmeta","download_url":"https://codeload.github.com/lloydmeta/slim-play/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745625,"owners_count":20503042,"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":["play","play-framework","rest","router","scala","slim-framework","webapp"],"created_at":"2024-08-02T18:00:32.486Z","updated_at":"2026-02-27T18:50:42.530Z","avatar_url":"https://github.com/lloydmeta.png","language":"Scala","readme":"## Slim Play App [![Build Status](https://travis-ci.org/lloydmeta/slim-play.svg?branch=master)](https://travis-ci.org/lloydmeta/slim-play)\n\nWanna build a really, really slim Play project?\n\nThis project demonstrates how you can easily build a non-blocking, threadsafe, and fast Play app without having to\nuse the default `routes` file. The end-result should be familiar territory for people who are used to the simplicity of Sinatra/Bottle\nbut want to take advantage of Scala's concurrent, type-safe and scalable nature.\n\n### Templates\n\nIn case you want to get up and running right away, use the following Slim-Play templates:\n\nFor [Giter8](https://github.com/n8han/giter8): `$ g8 lloydmeta/slim-play`\n\n### How to run\n\n1. Git clone this project or use [a template](#templates)\n2. `sbt run` from the project's root directory\n3. Open a browser and hit:\n  - [Hello $name endpoint](http://localhost:9000/hello/beachape)\n  - [Async Sqrt calculator](http://localhost:9000/sqrt/1764)\n\n### How it was built\n\nAll I did was:\n\n1. Use `sbt new` to generate a new Play app (`$ sbt new playframework/play-scala-seed.g8 --name=slim-play`)\n2. Delete the auto-generated controller, public, and view directories (won't be using them)\n3. Create a `AppLoader.scala` file in the `./app` directory, which holds an ApplicationLoader and the router, which is\n  super simple:\n\n  ```scala\n  val router = Router.from {\n    case GET(p\"/hello/$to\") =\u003e Action {\n      Ok(s\"Hello $to\")\n    }\n    /*\n     Use Action.async to return a Future result (sqrt can be intense :P)\n     Note the use of double(num) to bind only numbers (built-in :)\n     */\n    case GET(p\"/sqrt/${double(num)}\") =\u003e Action.async {\n      Future {\n        Ok(Math.sqrt(num).toString)\n      }\n    }\n  }\n  ```\n\n4. Add `play.application.loader=AppLoader` to `./conf/application.conf` so that Play knows to load our custom app (that\n  contains our simple router)\n\n### More info\n\nThe following links may be useful for further understanding on what is happening here:\n\n1. Official Play docs on [String Interpolating Routing DSL](https://www.playframework.com/documentation/2.4.x/ScalaSirdRouter)\n2. Official Play docs on [Compile-time dependency injection](https://www.playframework.com/documentation/2.4.x/ScalaCompileTimeDependencyInjection)\n","funding_links":[],"categories":["Templates"],"sub_categories":["Others"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydmeta%2Fslim-play","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flloydmeta%2Fslim-play","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydmeta%2Fslim-play/lists"}