File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,51 @@ git push origin <your_branch_name>
126
126
- Celebrate 🥳 your success after your pull request is merged successfully.
127
127
<p align =" right " >(<a href =" #top " >back to top</a >)</p >
128
128
129
+ # Backend Setup Instructions
130
+
131
+
132
+ 1 . Ensure Node.js and npm are installed on your system. You can verify installation by running:
133
+ ```
134
+ node -v
135
+ npm -v
136
+ ```
137
+
138
+ 2 . Navigate to the backend directory:
139
+ ```
140
+ cd server
141
+ ```
142
+
143
+ 3 . Install the required dependencies:
144
+ ```
145
+ npm install
146
+ ```
147
+
148
+ 4 . Create a .env file in the backend root directory and add your environment variables. Here's an example structure:
149
+ ```
150
+ MONGO_URI="mongodb+srv://<your_mongo_db_url>.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
151
+ SECRET_KEY="THIS_IS_A_JWT_SECRET"
152
+ ```
153
+
154
+ 5 . Start the backend server using nodemon:
155
+ ```
156
+ nodemon api/index.js
157
+ ```
158
+
159
+ This will start the server in development mode. By default, it will run on http://localhost:3000 .
160
+
161
+ Test the API endpoints using tools like Postman or Thunder Client.
162
+
163
+ Now for vercel Deployment:
164
+ 1 . Login into vercel account
165
+ 2 . Click on add project
166
+ 3 . select ` server ` as root directory
167
+ 4 . add this add env vars
168
+ ```
169
+ MONGO_URI="mongodb+srv://<your_mongo_db_url>.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
170
+ SECRET_KEY="THIS_IS_A_JWT_SECRET"
171
+ ```
172
+ And server will deployed on vercel
173
+
129
174
<!-- ------------------------------------------------>
130
175
131
176
<h2 >Contributing Guidelines📑</h2 >
You can’t perform that action at this time.
0 commit comments