Skip to content

Commit d7b367a

Browse files
committed
chore: create readme
1 parent 116829b commit d7b367a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# pwm-server-test
2+
3+
API for list items from SQLite Database using Django 4.2.13
4+
5+
Steps to run it locally:
6+
1. Install [Python 3.11](https://www.python.org/downloads/)
7+
2. Install "virtualenv": `pip install virtualenv`
8+
3. Create virtual environment: `virtualenv -p python3 venv`
9+
4. Apply virtual environment: `source venv/bin/activate`
10+
5. Install dependencies: `pip install -r requirements.txt`
11+
6. Run SQL migrations: `python3 manage.py migrate`
12+
7. Add sample data to database: `python3 manage.py load_items`
13+
8. Run server: `python manage.py runserver 0.0.0.0:8000`
14+
9. Test API with `curl http://127.0.0.1:8000/api/items`
15+
16+
Steps to run it in Docker:
17+
1. Run `docker run -p 8000:8000 -d $(docker build -q .)`
18+
2. Test API with `curl http://127.0.0.1:8000/api/items

0 commit comments

Comments
 (0)