https://github.com/apphero2/py-webchat
Python/Django & React Frontend WebChat
https://github.com/apphero2/py-webchat
Last synced: 2 months ago
JSON representation
Python/Django & React Frontend WebChat
- Host: GitHub
- URL: https://github.com/apphero2/py-webchat
- Owner: AppHero2
- Created: 2017-05-11T12:38:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T23:23:32.000Z (almost 8 years ago)
- Last Synced: 2025-03-23T10:46:06.833Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 1.02 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webchat #
[](https://travis-ci.org/dhedegaard/webchat)
[](https://coveralls.io/r/dhedegaard/webchat?branch=master)
[](https://requires.io/github/dhedegaard/webchat/requirements/?branch=master)
[](https://www.codacy.com/app/dhedegaard/webchat)
A simple Django app for doing webchat over HTTP, the frontend is implemented in React using Typescript, and uses the fetch API for long polling.
## For running the Django part of the project
Make sure you've got a recent python (3.4+, 2.7 not supported by Django 2.0+) installed, with `pip` and `virtualenv`
Usually for developing, I do something like:
```
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python manage.py runserver
```
For production usage you'll wanna look into using uwsgi, gunicorn or a similar WSGI-based application server.
## For building and developing the typescript web app
Make sure you have a recent version of NodeJS installed, with npm and/or yarn.
For setting up the environment and installing the needed packages with yarn, feel free to substitue with npm:
```
$ cd webapp
$ yarn
````
For development there's a `watch` script, call it like:
```
$ yarn watch
```
For building a minified production bundle:
```
$ yarn start
```
The frontend uses a few polyfills for supporting IE10+, these include babel-polyfill for `Promise` and whatwg-fetch for `fetch`.