---
title: "Conas Django a úsáid le Daphne"
version: 5.2
locale: ga
source: https://docs.djangoproject.com/ga/5.2/howto/deployment/asgi/daphne/
canonical: https://djangodocs.dev/ga/5.2/howto/deployment/asgi/daphne/
---
# Conas Django a úsáid le Daphne

[Daphne](https://pypi.org/project/daphne/) is a pure-Python ASGI server for UNIX, maintained by
members of the Django project. It acts as the reference server for ASGI.

## Suiteáil Daphne

Is féidir leat Daphne a shuiteáil le `pip`:

```shell
python -m pip install daphne
```

## Rith Django i Daphne

Nuair a bhíonn Daphne suiteáilte, tá ordú `daphne` ar fáil a thosaíonn próiseas freastalaí Daphne. Ag an rud is simplí, ní mór Daphne a ghlaoch le suíomh modúl ina bhfuil réad feidhmchláir ASGI, agus mar a thugtar ar an bhfeidhmchlár ina dhiaidh sin (scartha le colon).

Maidir le tionscadal tipiciúil Django, bheadh cuma Daphne ag glaoch:

```shell
daphne myproject.asgi:application
```

Cuirfidh sé seo tús le próiseas amháin ag éisteacht ar 127.0.0. 1:8000 . Éilíonn sé go mbeidh do thionscadal ar chonair Python; chun a chinntiú go rith an t-ordú seo ón eolaire céanna le do chomhad manage.py.

## Comhtháthú le `runserver`

Soláthraíonn Daphne ordú a:djadmin: runserver chun freastal ar do shuíomh faoi ASGI le linn na forbartha.

Is féidir é seo a chumasú trí `daphne` a chur le tús do :setting: INSTALLED\_APPS agus socrú `ASGI_APPLICATION` a chur leis ag díriú ar do réad feidhmchláir ASGI:

```
INSTALLED_APPS = [
    "daphne",
    ...,
]

ASGI_APPLICATION = "myproject.asgi.application"
```
