Skip to content

Commit 1969863

Browse files
anhptkthanhdev
andauthored
Enhance/update readme (#22)
* Update project README to run app locally --------- Co-authored-by: tthanh <ytominhthanh@gmail.com>
1 parent 45a836e commit 1969863

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,57 @@ For more information on how to this works with other frontends/backends, head ov
1515

1616
# How it works
1717

18-
> Describe the general architecture of your app here
18+
> See how the Medium.com clone (called Conduit) is built using Django REST Framework and Angular.
1919
2020
# Getting started
2121

2222
## Prerequisites
23+
Ensure you have Python 3 and Node.js installed on your system. The current project dependency versions are:
2324
- Python 3.10
2425
- Node.js 18.5.0
2526

2627
## Installation
28+
### 1. Frontend: Choose 1 of 2 ways below:
29+
- Install frontend dependencies and start frontend locally:
30+
```shell
31+
npm --prefix=frontend install
32+
npm --prefix=frontend start
33+
```
34+
This command will install and start the Angular development server. You can access the Angular application through your web browser at `http://localhost:4200`.
35+
36+
- Install and build frontend as static files (Choose this if you don't want to make any changes to Frontend project):
37+
```shell
38+
npm --prefix=frontend install
39+
npm --prefix=frontend run build
40+
```
41+
42+
### 2. Backend:
43+
- Set up a virtual environment
2744
```shell
2845
# Install environment and dependencies
2946
python3 -m venv .venv
30-
source .venv/bin/activate # or `.venv/Scripts/activate` on Windows
47+
source .venv/bin/activate
48+
49+
# or use this command on Windows
50+
python3 -m venv .venv
51+
.venv/Scripts/activate
52+
```
53+
54+
- Install backend dependencies:
55+
```shell
3156
pip install -r backend/requirements.txt
57+
```
3258

59+
- Apply database migrations:
60+
```shell
3361
# Apply migrations
3462
python backend/manage.py migrate
63+
```
3564

36-
# Install and build frontend
37-
npm --prefix=frontend install
38-
npm --prefix=frontend run build
39-
65+
- Run the Django development server:
66+
```shell
4067
# Run server
4168
python backend/manage.py runserver
4269
```
70+
71+
Now, your local server should be running, and you can access this Django/Angular application through your web browser at http://localhost:8000.

0 commit comments

Comments
 (0)