Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yuehhua/django-restful-demo


https://github.com/yuehhua/django-restful-demo

Last synced: 12 days ago
JSON representation

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
```