{"id":27197769,"url":"https://github.com/preaction/mojolicious-plugin-autoreload","last_synced_at":"2025-04-09T20:29:33.393Z","repository":{"id":56833720,"uuid":"125764064","full_name":"preaction/Mojolicious-Plugin-AutoReload","owner":"preaction","description":"Automatically reload open browser windows when your application changes","archived":false,"fork":false,"pushed_at":"2020-08-05T03:21:24.000Z","size":58,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-17T21:17:02.282Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preaction.png","metadata":{"files":{"readme":"README.mkdn","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-18T20:19:02.000Z","updated_at":"2024-04-17T21:17:02.283Z","dependencies_parsed_at":"2022-09-08T07:41:38.081Z","dependency_job_id":null,"html_url":"https://github.com/preaction/Mojolicious-Plugin-AutoReload","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-AutoReload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-AutoReload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-AutoReload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preaction%2FMojolicious-Plugin-AutoReload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preaction","download_url":"https://codeload.github.com/preaction/Mojolicious-Plugin-AutoReload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248106847,"owners_count":21048807,"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":[],"created_at":"2025-04-09T20:29:32.777Z","updated_at":"2025-04-09T20:29:33.385Z","avatar_url":"https://github.com/preaction.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/preaction/Mojolicious-Plugin-AutoReload.svg?branch=master)](https://travis-ci.org/preaction/Mojolicious-Plugin-AutoReload)\n[![Coverage Status](https://coveralls.io/repos/preaction/Mojolicious-Plugin-AutoReload/badge.svg?branch=master)](https://coveralls.io/r/preaction/Mojolicious-Plugin-AutoReload?branch=master)\n\n# NAME\n\nMojolicious::Plugin::AutoReload - Automatically reload open browser windows when your application changes\n\n# VERSION\n\nversion 0.010\n\n# SYNOPSIS\n\n    use Mojolicious::Lite;\n    plugin AutoReload =\u003e {};\n    get '/' =\u003e 'index';\n    app-\u003estart;\n    __DATA__\n    @@ index.html.ep\n    Hello world!\n\n# DESCRIPTION\n\nThis plugin automatically reloades the page when the Mojolicious webapp\nrestarts.  This is especially useful when using [the Morbo development\nserver](http://mojolicious.org/perldoc/Mojolicious/Guides/Tutorial#Reloading),\nwhich automatically restarts the webapp when it detects changes.\nCombined, `morbo` and `Mojolicious::Plugin::AutoReload` will\nautomatically display your new content whenever you change your webapp\nin your editor!\n\nThis works by opening a WebSocket connection to a specific Mojolicious\nroute. When the server restarts, the WebSocket is disconnected, which\ntriggers a reload of the page.\n\nThe AutoReload plugin will automatically add a `\u003cscript\u003e` tag to\nyour HTML pages while running in `development` mode. If you need to\ncontrol where this script tag is written, use the [\"auto\\_reload\"](#auto_reload)\nhelper.\n\nTo disable the plugin for a single page, set the `plugin.auto_reload.disable` stash value to a true value:\n\n    get '/' =\u003e sub {\n        my ( $c ) = @_;\n        # Don't auto-reload the home page\n        $c-\u003estash( 'plugin.auto_reload.disable' =\u003e 1 );\n        ...\n    };\n\n# HELPERS\n\n## auto\\_reload\n\nThe `auto_reload` template helper inserts the JavaScript to\nautomatically reload the page. This helper only works when the\napplication mode is `development`, so you can leave this in all the\ntime and have it only appear during local development.\n\nThis is only needed if you want to control where the `\u003cscript\u003e`\nfor automatically-reloading is rendered.\n\n# ROUTES\n\n## /auto\\_reload\n\nThis plugin adds a `/auto_reload` WebSocket route to your application.\n\n# SEE ALSO\n\n[Mojolicious](https://metacpan.org/pod/Mojolicious)\n\n# THANKS\n\nThanks to [Grant Street Group](https://grantstreet.com) for funding\ncontinued development of this plugin!\n\n# AUTHOR\n\nDoug Bell \u003cpreaction@cpan.org\u003e\n\n# CONTRIBUTORS\n\n- Robert DeRose \u003cRobertDeRose@users.noreply.github.com\u003e\n- Zeeshan Muhammad \u003czeeshan@dkhr.com\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2018 by Doug Bell.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fmojolicious-plugin-autoreload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreaction%2Fmojolicious-plugin-autoreload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreaction%2Fmojolicious-plugin-autoreload/lists"}