dwitter
                                
                                
                                
                                    dwitter copied to clipboard
                            
                            
                            
                        Social network for short js demos
dwitter
A platform to write visual art in javascript limited to 140 characters.
The frontend is currently being rewritten, so please direct frontend development to dwitter-frontend. The new frontend is currently hosted at beta.dwitter.net.
Available on dwitter.net
Join the chat on Discord
Inspired by arkt.is/t/
Pre-requisites and first-time installation
- Install 
npm sudo apt install npm- Get packages needed for server and clone the repository
 sudo apt install git virtualenv python-pipgit clone https://github.com/lionleaf/dwitter.git
Setup
Linux
make setup(set up virtual environment)source venv/bin/activate(activate virtual environment)make(install dependencies and set up database)python manage.py createsuperuser(create admin account used below)make runruns the server. Usemake serveinstead if you're working inside a VM with port forwarding. (0.0.0.0:8000)- Go to http://localhost:8000/admin/sites/ and log in with admin account created above.
 - Click on the one entry, and change both 
domain nameanddisplay nameto localhost:8000. - Make sure http://dweet.localhost:8000/ returns a django error. May not work in Firefox.
 
Windows
- Download the latest python3.7 release.
 - Without installing the setup, extract all the files in the a new directory such as 
./python37 - Set up virtual environment using the extracted interpreter: 
virtualenv --python ./python37/python.exe venv - Activate the venv: 
cd venv/Scripts && activate.bat - Get back in the main directory (
cd ../.. && make) and usemakecommand (install dependencies and set up database) - Continue with the fourth step from Linux setup.
 
Other commands
make migrationsmake migratemake lint- lints Python and JS files
 - automatically fixes some JS issues (mostly whitespace-related)
 
make shellmake backupmake restore-backup
Dwitter API
Dweets
GET www.dwitter.net/api/dweets/  - list of the last 10 dweets
       ?limit=100            - number of results to return, default 10, max 100 (subject to change)
       &offset=200           - offset page by 200 dweets
       &remix_of=123         - all remixes of 123
       &author=lionleaf      - dweets by author
GET www.dwitter.net/api/dweets/123  - get details about d/123
Latest dweet: https://www.dwitter.net/api/dweets/?limit=1  (sorted by posted date by default)
Users
GET dwitter.net/api/users/lionleaf  - Show details about user 'lionleaf'.