-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
119 lines (101 loc) · 2.85 KB
/
setup.bat
File metadata and controls
119 lines (101 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@echo off
REM NSFW Detection API - Quick Setup Script for Windows
REM This script automates the initial setup process
echo ================================================
echo 🚀 NSFW Detection API - Quick Setup
echo ================================================
echo.
REM Check if Node.js is installed
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ Node.js is not installed. Please install Node.js 18+ first.
echo Visit: https://nodejs.org/
exit /b 1
)
echo ✅ Node.js installed
node --version
echo.
REM Check if npm is installed
where npm >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ npm is not installed. Please install npm first.
exit /b 1
)
echo ✅ npm installed
npm --version
echo.
REM Backend Setup
echo 📦 Setting up Backend...
echo ----------------------------------------
cd backend
if not exist "package.json" (
echo ❌ Backend package.json not found!
exit /b 1
)
echo Installing backend dependencies...
call npm install
if not exist ".env" (
echo Creating .env file from template...
copy .env.example .env
echo ⚠️ Please edit backend\.env with your actual credentials
) else (
echo ✅ .env file already exists
)
cd ..
REM Frontend Setup
echo.
echo 📦 Setting up Frontend...
echo ----------------------------------------
cd frontend
if not exist "package.json" (
echo ❌ Frontend package.json not found!
exit /b 1
)
echo Installing frontend dependencies...
call npm install
if not exist ".env" (
echo Creating .env file from template...
copy .env.example .env
echo ⚠️ Please edit frontend\.env with your Clerk keys
) else (
echo ✅ .env file already exists
)
cd ..
REM Create uploads directory for backend
if not exist "backend\uploads" mkdir backend\uploads
echo.
echo ================================================
echo ✅ Setup Complete!
echo ================================================
echo.
echo Next Steps:
echo.
echo 1. Configure MongoDB Atlas:
echo - Create a free cluster at https://www.mongodb.com/cloud/atlas
echo - Get your connection string
echo - Add it to backend\.env as MONGODB_URI
echo.
echo 2. Configure Clerk:
echo - Create an app at https://clerk.com
echo - Get your API keys
echo - Add them to both backend\.env and frontend\.env
echo.
echo 3. Update environment variables:
echo - Edit backend\.env
echo - Edit frontend\.env
echo.
echo 4. Start the application:
echo Terminal 1: cd backend ^&^& npm run dev
echo Terminal 2: cd frontend ^&^& npm run dev
echo.
echo 5. Access the application:
echo Frontend: http://localhost:5173
echo Backend: http://localhost:5000
echo.
echo 📖 For detailed instructions, see QUICKSTART.md
echo 🚀 For deployment guide, see DEPLOYMENT.md
echo 📚 For API docs, see API_DOCS.md
echo.
echo Built with ❤️ by @TechyCSR
echo ================================================
pause