Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-butti committed May 20, 2023
1 parent 3c928a9 commit 2255dd6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog

## 0.0.1 - WIP
## 0.0.1 - 2023-05-19
- Initial Proof of Concept
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,13 @@ you don't need additional services or external tools to enable the Web Socket fu

## Installing LaraSock

The LaraSock `hi-folks/lara-sock` is provided as PHP package that you can install
in your Laravel project.
The LaraSock `hi-folks/lara-sock` is provided as PHP package that you can install in your Laravel project.
To install the package you can use `composer require`:

```bash
composer require hi-folks/lara-sock
```

Ehi, **the package is not yet release**, so for now, if you want to try it, before to execute `composer require` you have to clone the repository,
and in your `composer.json` of your project file :
```json lines
"repositories": [
{
"type": "path",
"url": "../lara-sock"
}
]
```
and then, be sure that your minimum-stability, in the `composer.json` of your Laravel project is set to `dev`:
```json lines
"minimum-stability": "dev",
"prefer-stable": true,
```

## Starting the server

Expand Down Expand Up @@ -76,6 +61,15 @@ you have to "bind" to 0.0.0.0 ip address:
```shell
php artisan larasock:start --host=0.0.0.0
```

If you have Tmux installed you can use it for starting Octane Web server and the WebSocket server in the same screen.
```shell
tmux \
new-session 'php artisan octane:start' \; \
split-window 'php artisan larasock:start --logchannel=stderr' \; \
detach-client
tmux a
```
### The client
Once you started the Web Socket Server, you can start creating your Web client to send and receive messages.
To do that you can implement your HTML page and using Websocket Javascript class.
Expand Down

0 comments on commit 2255dd6

Please sign in to comment.