Skip to content

Commit 1912e2e

Browse files
committed
address PR comments
1 parent 58eb3b5 commit 1912e2e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ git clone https://github.com/FalkorDB/code-graph-backend.git
3333

3434
#### Setup environment variables
3535

36+
`SECRET_TOKEN` - user defined token used to authorize the request
37+
3638
```bash
37-
export FALKORDB_HOST=falkordb FALKORDB_PORT=6379 \
38-
OPENAI_API_KEY=<YOUR OPENAI_API_KEY> SECRET_TOKEN=Vespa \
39+
export FALKORDB_HOST=localhost FALKORDB_PORT=6379 \
40+
OPENAI_API_KEY=<YOUR OPENAI_API_KEY> SECRET_TOKEN=<YOUR_SECRECT_TOKEN> \
3941
FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_PORT=5000
4042
```
4143

@@ -46,7 +48,8 @@ cd code-graph-backend
4648

4749
pip install --no-cache-dir -r requirements.txt
4850

49-
flask --app api/index.py run --debug
51+
flask --app api/index.py run --debug > flask.log 2>&1 &
52+
5053
```
5154

5255
### Run Code-Graph-Frontend
@@ -60,7 +63,8 @@ git clone https://github.com/FalkorDB/code-graph.git
6063
#### Setup environment variables
6164

6265
```bash
63-
export BACKEND_URL=http://localhost:5000 SECRET_TOKEN=Vespa OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
66+
export BACKEND_URL=http://${FLASK_RUN_HOST}:${FLASK_RUN_PORT} \
67+
SECRET_TOKEN=<YOUR_SECRECT_TOKEN> OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
6468
```
6569

6670
#### Install dependencies & run
@@ -73,7 +77,7 @@ npm run dev
7377

7478
### Process a local repository
7579
```bash
76-
curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "<PATH_TO_LOCAL_REPO>", "ignore": ["./.github", "./sbin", "./.git","./deps", "./bin", "./build"]}' -H "Authorization: Vespa"
80+
curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "<PATH_TO_LOCAL_REPO>", "ignore": ["./.github", "./sbin", "./.git","./deps", "./bin", "./build"]}' -H "Authorization: <YOUR_SECRECT_TOKEN>"
7781
```
7882

7983
Note: At the moment code-graph can analyze both the C & Python source files.

0 commit comments

Comments
 (0)