Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phx.gen.socket moduledoc grammar and example path #5769

Merged
merged 2 commits into from Apr 2, 2024

Conversation

03juan
Copy link
Contributor

@03juan 03juan commented Apr 2, 2024

Hi there.

This fixes some small grammar inconsistencies, as well as the path for the umbrella app example.

@03juan
Copy link
Contributor Author

03juan commented Apr 2, 2024

~/code/elixir/tests/my_app_umbrella                 13:44:52
❯ cd apps/my_app_web 

~/code/elixir/tests/my_app_umbrella/apps/my_app_web
❯ mix phx.gen.socket User
* creating lib/my_app_web/channels/user_socket.ex
* creating assets/js/user_socket.js

Add the socket handler to your `lib/my_app_web/endpoint.ex`, for example:

    socket "/socket", MyAppWeb.UserSocket,
      websocket: true,
      longpoll: false

For the front-end integration, you need to import the `user_socket.js`
in your `assets/js/app.js` file:

    import "./user_socket.js"

@03juan 03juan changed the title Fix mix.gen.socket module doc grammar and example path Fix phx.gen.socket module doc grammar and example path Apr 2, 2024
@03juan 03juan changed the title Fix phx.gen.socket module doc grammar and example path Fix phx.gen.socket moduledoc grammar and example path Apr 2, 2024
@chrismccord chrismccord merged commit 2c5da88 into phoenixframework:main Apr 2, 2024
5 of 6 checks passed
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants