Skip to content

Commit bbe9a7a

Browse files
authored
Merge pull request #63 from deepraj21/main
added setup batch file to automate the local installation
2 parents 28966b9 + 2881da2 commit bbe9a7a

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ Enter into the root directory.
3131
```bash
3232
cd devhub
3333
```
34+
You can use `setup.bat` to automate the installation and running process of the webapp. (make sure to make `.env` in server and populate it with the data)
35+
36+
```bash
37+
./setup.bat
38+
```
39+
### Manual Installation
40+
3441
Open two terminal for server and client and enter into the directories.
3542
```bash
3643
## 1st terminal for server

server/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# this is an example .env content. make sure to make a .env and populate it with your original data
2+
3+
GOOGLE_API_KEY=
4+
SECRET_KEY=
5+
NEO4J_URI=
6+
NEO4J_USER=
7+
NEO4J_PASSWORD=
8+
MONGODB_URI=

setup.bat

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
REM Check and setup backend virtual environment if not exists
4+
IF NOT EXIST server\venv (
5+
echo Setting up backend virtual environment...
6+
python -m venv server\venv
7+
)
8+
call server\venv\Scripts\activate
9+
10+
REM Install backend dependencies
11+
pip install -r server\requirements.txt
12+
if %errorlevel% neq 0 exit /b %errorlevel%
13+
14+
REM Start backend
15+
start cmd /k "cd server && flask run"
16+
17+
REM Check and setup frontend node modules if not exists
18+
IF NOT EXIST client\node_modules (
19+
echo Setting up frontend node modules...
20+
pushd client
21+
npm install --force
22+
if %errorlevel% neq 0 popd & exit /b %errorlevel%
23+
popd
24+
)
25+
26+
REM Start frontend
27+
start cmd /k "cd client && npm run dev"

0 commit comments

Comments
 (0)