{"id":20477902,"url":"https://github.com/hung-phan/scala-template","last_synced_at":"2026-04-20T02:02:56.340Z","repository":{"id":12333981,"uuid":"71696064","full_name":"hung-phan/scala-template","owner":"hung-phan","description":"This is the boilerplate for scala play","archived":false,"fork":false,"pushed_at":"2022-12-11T11:49:04.000Z","size":685,"stargazers_count":1,"open_issues_count":22,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T14:49:48.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/hung-phan.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":"2016-10-23T10:31:59.000Z","updated_at":"2021-11-03T01:51:44.000Z","dependencies_parsed_at":"2022-08-07T13:00:04.547Z","dependency_job_id":null,"html_url":"https://github.com/hung-phan/scala-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hung-phan/scala-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hung-phan%2Fscala-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hung-phan%2Fscala-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hung-phan%2Fscala-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hung-phan%2Fscala-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hung-phan","download_url":"https://codeload.github.com/hung-phan/scala-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hung-phan%2Fscala-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32029858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T15:34:11.732Z","updated_at":"2026-04-20T02:02:56.302Z","avatar_url":"https://github.com/hung-phan.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Play Framework with Scala.js\n\n[![build status](https://travis-ci.org/hung-phan/scala-template.svg?branch=master)](http://travis-ci.org/hung-phan/scala-template/)\n\nThis is a simple example application showing how you can integrate a Play project with a Scala.js project.\n\nThe application contains three directories:\n* `server` Play application (server side).\n* `client` Scala.js application (client side).\n* `shared` Scala code that you want to share between the server and the client.\n\n## Run the application\n\n### Requirements\n\n- [node](https://nodejs.org/en/)\n\nInstall npm dependencies\n\n```bash\n$ cd server/frontend \u0026\u0026 npm install # run this only once\n```\n\n### Development\n```bash\n$ docker-compose up -d\n$ sbt -Dconfig.file=server/conf/development.conf run\n$ cd server/frontend \u0026\u0026 npm run start # in separated terminal\n```\n\n### Testing\n```bash\n$ docker-compose -f docker-compose.test.yml up -d\n$ sbt -Dconfig.file=server/conf/testing.conf -Denv=test test\n$ docker-compose -f docker-compose.test.yml down\n```\n\n### Production\n\nRun this to build all the assets using webpack bundler. You must see the profile to know how to\nreplace application configuration with your environment configuration.\n\n```bash\n$ sbt -Denv=prod webpackProTask\n$ sbt -Denv=prod 'set scalaJSStage in Global := FullOptStage' docker:publishLocal # Replace docker:publishLocal with other built tasks on your demand\n```\n\nTo start it in local, run:\n\n```bash\n$ docker-compose -f docker-compose.prod.yml up\n```\n\n## Features\n\nThe application uses the [sbt-web-scalajs](https://github.com/vmunier/sbt-web-scalajs) sbt plugin and\nthe [scalajs-scripts](https://github.com/vmunier/scalajs-scripts) library.\n\n- Run your application like a regular Play app\n  - `compile` triggers the Scala.js fastOptJS command.\n  - `run` triggers the Scala.js fastOptJS command on page refresh.\n  - `~compile`, `~run`, continuous compilation is also available.\n- Compilation errors from the Scala.js projects are also displayed in the browser.\n- Production archives (e.g. using `stage`, `dist`) contain the optimised javascript.\n- Source maps\n  - Open your browser dev tool to set breakpoints or to see the guilty line of code when an exception is thrown.\n  - Source Maps is _disabled in production_ by default to prevent your users from seeing the source files. But it can\n  easily be enabled in production too by setting `emitSourceMaps in fullOptJS := true` in the Scala.js projects.\n\n## Cleaning\n\nThe root project aggregates all the other projects by default.\nUse this root project, called `scala-template`, to clean all the projects at once.\n\n```bash\n$ ./scripts/clean.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhung-phan%2Fscala-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhung-phan%2Fscala-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhung-phan%2Fscala-template/lists"}