Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuehhua/django-restful-demo
https://github.com/yuehhua/django-restful-demo
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuehhua/django-restful-demo
- Owner: yuehhua
- License: mit
- Created: 2018-07-26T03:28:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-08T03:15:31.000Z (about 6 years ago)
- Last Synced: 2023-02-27T00:21:46.320Z (almost 2 years ago)
- Language: Dockerfile
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django RESTful API echo server
Demo a echo server using Django RESTfull framework.
## Install
1. Establish virtual environment first
2. `source /bin/activate`
3. `pip install -r requirements.txt`### test uwsgi
```
uwsgi --wsgi-file demo/test-wsgi.py
```## Configuration
Change your `demo/uwsgi.ini`:
Change `chdir = /demo` to your project directory.
## Usage
### start manually
`uwsgi demo/uwsgi.ini`.
It will open a http socket on 127.0.0.1:8000 and a monitoring port on 8001.
### start docker
```
docker run -d -p 8000:8000 a504082002/echo-server-drf
```### test
You can try using GET method:
```
http://127.0.0.1:8000/echo/?number=123
```