A chat application
cd /path/to/workspace
git clone git@github.com:Carrene/jaguar.git
cd jaguar
pip install -e .
db:
url: postgresql://postgres:postgres@localhost/jaguar_dev
test_url: postgresql://postgres:postgres@localhost/jaguar_test
administrative_url: postgresql://postgres:postgres@localhost/postgres
oauth:
secret: A1dFVpz4w/qyym+HeXKWYmm6Ocj4X5ZNv1JQ7kgHBEk=\n
application_id: 1
url: http://localhost:8080
storage:
local_directory: %(root_path)s/data/assets
base_url: http://localhost:8080/assets
jaguar db create --drop --mockup
And or
jaguar db create --drop --basedata
jaguar [-c path/to/config.yml] db --drop
jaguar [-c path/to/config.yml] db --create
Or, you can add --drop to drop the previously created database: TAKE CARE ABOUT USING THAT
jaguar [-c path/to/config.yml] db create --drop
To start the websocket server run the following command:
jaguar websocket startTo route the messages from the worker queue to right WebSocket connection,
use the following command:
jaguar router startAs a client you can recieve the message enqueued by the wscat cli app. Like:
wscat -c ws://localhost:8085?token=$(jaguar token create 2 `panda access-token create -s email -- 2 1`)when given access token, panda must be running.
cd path/to/panda
./gunicornRun jaguar REST API server
cd path/to/jaguar
./gunicornTo enqueue the message, run the following command:
curl -XSEND localhost:8084/apiv1/targets/1/messages \
-H"Authorization: $(jaguar token create 2 `panda access-token create -s email title avatar -- 2 1`)" \
-F"body=abc" \
-F"mimetype=text/plain"NOTE: If you want to get by another user, notice you enter sudo -u <username> before the commands. like:
jaguar token create 2 `panda access-token create -s email -- 2 1`