Update README.md
This commit is contained in:
parent
5b813c2335
commit
31ce3f29f3
10
README.md
10
README.md
|
@ -16,13 +16,13 @@ Next, clone the repository with `git clone https://git.maxwellj.xyz/max/chookpen
|
||||||
|
|
||||||
Once you've created an account through the API, you can send requests using your token and username. You can send a request to see the chat history like this: `http://localhost:8000/api/username:{(your username)}token:{(your password)}`. If you'd like to send a message, it's like this: `http://localhost:8000/api/username:{(your username)}token:{(your password)}message:{(a message)}`.
|
Once you've created an account through the API, you can send requests using your token and username. You can send a request to see the chat history like this: `http://localhost:8000/api/username:{(your username)}token:{(your password)}`. If you'd like to send a message, it's like this: `http://localhost:8000/api/username:{(your username)}token:{(your password)}message:{(a message)}`.
|
||||||
|
|
||||||
If you don't want all the hassle of sending requests, you can use the experimental CLI client. Open a new terminal, and cd to `client-cli`. Run `gradle installDist`, and wait for it to build. Cd to build/install. Make a file called `.chookpen.profile` and add the following information, styled like a Unix /etc/passwd (colons in between items):
|
If you don't want all the hassle of sending requests, you can use the experimental CLI client. Open a new terminal, and cd to `client-cli`. Run `gradle installDist`, and wait for it to build. Cd to build/install. Make a file called `.chookpen.profile` in your home directory and add the following information, styled like a Unix /etc/passwd (colons in between items):
|
||||||
|
|
||||||
`username:password:server:port:0`
|
`username:password:server:port:0`
|
||||||
|
|
||||||
NOTE: When creating your account with this method, use the MD5 hash of your password. If you're unsure of what it is, just fill in all your details in .chookpen.profile and run the program. The server will tell you the hash the CLI created.
|
NOTE: When creating your account with this method, use the MD5 hash of your password. If you're unsure of what it is, just fill in all your details in .chookpen.profile and run the program. The server will tell you the hash the CLI created.
|
||||||
|
|
||||||
Once you're set up, run the CLI program in bin. Use the .bat if you're on Windows (yucky). If you want to send a message, add that as your argument. You should see all the messages! If that isn't working, make sure your .chookpen.profile is in your current directory.
|
Once you're set up, run the CLI program in bin. Use the .bat if you're on Windows (yucky). You should be able to send and recieve messages! If that isn't working, make sure your .chookpen.profile is in your system home directory.
|
||||||
|
|
||||||
## How can I make my own client?
|
## How can I make my own client?
|
||||||
|
|
||||||
|
@ -82,6 +82,10 @@ A successful response should contain everything in `chatHistory` in the director
|
||||||
|
|
||||||
`Invalid token` - Password is wrong
|
`Invalid token` - Password is wrong
|
||||||
|
|
||||||
|
### Websockets
|
||||||
|
|
||||||
|
Chookpen supports websockets for live updating of messages. You can establish a websocket connection with the URL `ws://(server):(port)/api/websocket/`. Send a login request to the websocket: `username:{(username)}password:{(password)}`. If your username and password are correct, you should start recieving messages. Send a message: `username:{(username)}password:{(password)}message:{(message)}`
|
||||||
|
|
||||||
## Some handy tips and tricks
|
## Some handy tips and tricks
|
||||||
|
|
||||||
Chookpen Server **does not support HTTPS!** You can put Chookpen Server behind a reverse proxy and that will sort that out for you.
|
Chookpen Server **does not support HTTPS!** You can put Chookpen Server behind a reverse proxy and that will sort that out for you.
|
||||||
|
@ -89,3 +93,5 @@ Chookpen Server **does not support HTTPS!** You can put Chookpen Server behind a
|
||||||
Chookpen Server and CLI client are both in an alpha stage, keep this in mind before doing ANYTHING with it!
|
Chookpen Server and CLI client are both in an alpha stage, keep this in mind before doing ANYTHING with it!
|
||||||
|
|
||||||
Chookpen Server is not ready for production :/
|
Chookpen Server is not ready for production :/
|
||||||
|
|
||||||
|
The port for the server is 7070.
|
Loading…
Reference in New Issue
Block a user