No description
You can now specify custom event handlers for SocketIO.
Usage:
1. In your app's hooks.py add `has_realtime_event_handlers=True` so
Framework can assume your app contains custom handler and import them.
2. Create a file called `/app/realtime/handlers.js` with single module
export a function that will setup handlers using socket.
Here's sample code:
```js
// This is /app_root/realtime/handler.js`
function chat_app_handlers(socket) {
socket.on("hello_chat") {
console.log("hello world!");
}
}
module.exports = chat_app_handlers;
```
3. Restart SocketIO server and see if it worked by sending event from
client. In desk based app you can do
`frappe.realtime.socket.emit("hello_chat")`
Middlewares are not yet possible... will be worked upon __some other day__ [tm]
closes https://github.com/frappe/frappe/issues/21528
|
||
|---|---|---|
| .github | ||
| cypress | ||
| esbuild | ||
| frappe | ||
| realtime | ||
| .coveragerc | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .mergify.yml | ||
| .pre-commit-config.yaml | ||
| .releaserc | ||
| .semgrepignore | ||
| attributions.md | ||
| babel_extractors.csv | ||
| CODE_OF_CONDUCT.md | ||
| codecov.yml | ||
| CODEOWNERS | ||
| commitlint.config.js | ||
| crowdin.yml | ||
| cypress.config.js | ||
| generate_bootstrap_theme.js | ||
| hooks.md | ||
| LICENSE | ||
| node_utils.js | ||
| package.json | ||
| pyproject.toml | ||
| README.md | ||
| SECURITY.md | ||
| sider.yml | ||
| socketio.js | ||
| yarn.lock | ||
Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext.
Login for the PWD site: (username: Administrator, password: admin)
Table of Contents
Installation
Production
- Managed Hosting on Frappe Cloud
- Easy install script using Docker images
- Manual install using Docker images
Development
Contributing
Resources
- frappeframework.com - Official documentation of the Frappe Framework.
- frappe.school - Pick from the various courses by the maintainers or from the community.
- buildwithhussain.dev - Watch Frappe Framework being used in the wild to build world-class web apps.
License
This repository has been released under the MIT License.
By contributing to Frappe, you agree that your contributions will be licensed under its MIT License.