Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fzumstein committed Aug 16, 2024
1 parent ffaae04 commit 4e4082c
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

To get a prod-like setup while running the app locally, run the following in separate terminals:

* `docker compose -f tests/docker-compose.redis.yaml up`
* `uvicorn app.main:main_app --host 0.0.0.0 --port 8000 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem`
* `export XLWINGS_SOCKETIO_SERVER_APP=true && uvicorn app.main:sio_app --host 0.0.0.0 --port 8001 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem`
- `docker compose -f tests/docker-compose.redis.yaml up`
- `uvicorn app.main:main_app --host 0.0.0.0 --port 8000 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem`
- `export XLWINGS_SOCKETIO_SERVER_APP=true && uvicorn app.main:sio_app --host 0.0.0.0 --port 8001 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem`

in `.env`:

Expand All @@ -17,12 +17,20 @@ XLWINGS_SOCKETIO_MESSAGE_QUEUE_URL=redis://localhost:6379/0
in `socketio-handlers.js`:

```js
globalThis.socket = io('https://127.0.0.1:8001', {
auth: async (callback) => {
let token = await globalThis.getAuth();
callback({
token: token,
});
},
});
globalThis.socket = io("https://127.0.0.1:8001", {
auth: async (callback) => {
let token = await globalThis.getAuth();
callback({
token: token,
});
},
});
```

# Install the xlwings Python package from its repo into xlwings-server in editable mode

- xlwings: delete `project.toml` temporarily
- xlwings: replace `version = "dev"` with the version from `xlwings.js`
- xlwings-server: `pip uninstall xlwings`
- xlwings-server: `cd ~/dev/xlwings && python setup.py develop`
- xlwings: undo deletion of `project.toml`

0 comments on commit 4e4082c

Please sign in to comment.