You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -147,17 +166,17 @@ If you prefer to use Docker, you can install the app using the following command
147
166
148
167
Run the following command to build the Docker image:
149
168
150
-
````bash
151
-
docker build -t talawa-admin .
152
169
```bash
170
+
docker build -t talawa-admin .
171
+
```
153
172
154
173
3. Run the Docker container:
155
174
156
175
After the build is complete, run the Docker container using this command:
157
176
158
177
```bash
159
178
docker run -p 4321:4321 talawa-admin
160
-
```bash
179
+
```
161
180
162
181
The application will be accessible at `http://localhost:4321`
163
182
@@ -169,18 +188,16 @@ You can use our interactive setup script for the configuration. Use the followin
169
188
170
189
```bash
171
190
npm run setup
172
-
```bash
191
+
```
173
192
174
193
All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file)
175
194
176
195
## Creating .env file
177
196
178
197
A file named .env is required in the root directory of talawa-admin forstoring environment variables used at runtime. It is not a part of the repo and you will have to create it. For a sample of `.env` file there is a file named `.env.example`in the root directory. Create a new `.env` file by copying the contents of the `.env.example` into `.env` file. Use this command:
179
198
180
-
````
181
-
199
+
```
182
200
cp .env.example .env
183
-
184
201
```
185
202
186
203
This `.env` file must be populated with the following environment variables for`talawa-admin` to work:
@@ -204,51 +221,39 @@ Add a custom port number for Talawa-Admin development purposes to the variable n
204
221
Add the endpoint foraccessing talawa-api graphql service to the variable named `REACT_APP_TALAWA_URL`in the `.env` file.
## Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file
229
240
230
241
The endpoint foraccessing talawa-api WebSocket graphql service for handling subscriptions is automatically added to the variable named `REACT_APP_BACKEND_WEBSOCKET_URL`in the `.env` file.
For additional details, please refer the `How to Access the Talawa-API URL` section in the INSTALLATION.md file found in the [Talawa-API repo](https://github.com/PalisadoesFoundation/talawa-api).
@@ -268,9 +273,7 @@ If you want to setup Google reCAPTCHA now, you may refer to the `RECAPTCHA` sect
268
273
Copy/paste this `reCAPTCHA site key` to the variable named `REACT_APP_RECAPTCHA_SITE_KEY`in`.env` file.
@@ -286,27 +289,21 @@ It's now time to start Talawa-Admin and get it running
286
289
Run the following command to start `talawa-admin` development server:
287
290
288
291
```
289
-
290
292
npm run serve
291
-
292
293
```
293
294
294
295
## Accessing Talawa-Admin
295
296
296
297
By default `talawa-admin` runs on port `4321` on your system's localhost. It is available on the following endpoint:
297
298
298
299
```
299
-
300
300
http://localhost:4321/
301
-
302
301
```
303
302
304
303
If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint:
305
304
306
305
```
307
-
308
306
http://localhost:${{customPort}}/
309
-
310
307
```
311
308
312
309
Replace `${{customPort}}` with the actual custom port number you have configured in your `.env` file.
@@ -328,20 +325,16 @@ It is important to test our code. If you are a contributor, please follow these
328
325
You can run the tests for `talawa-admin` using this command:
329
326
330
327
```
331
-
332
328
npm run test
333
-
334
329
```
335
330
336
331
## Debugging tests
337
332
338
333
You can see the output of failing tests in broswer by running `jest-preview` package before running your tests
339
334
340
335
```
341
-
342
336
npm run jest-preview
343
337
npm run test
344
-
345
338
```
346
339
347
340
You don't need to re-run the `npm run jest-preview`command each time, simply run the `npm run test`commandif the Jest Preview server is already running in the background, it'll automatically detect any failing tests and show the preview at `http://localhost:3336` as shown in this screenshot -
@@ -353,9 +346,7 @@ You don't need to re-run the `npm run jest-preview` command each time, simply ru
353
346
You can lint your code files using this command:
354
347
355
348
```
356
-
357
349
npm run lint:fix
358
-
359
350
```
360
351
361
352
## Husky for Git Hooks
@@ -368,15 +359,18 @@ We run a pre-commit hook which automatically runs code quality checks each time
368
359
369
360
If you don't want these pre-commit checks running on each commit, you can manually opt out of it using the `--no-verify` flag with your commit message as shown:-
370
361
371
-
git commit -m "commit message" --no-verify
362
+
```
363
+
git commit -m "commit message" --no-verify
364
+
```
372
365
373
366
#### post-merge hook
374
367
375
368
We are also running a post-merge(post-pull) hook which will automatically run "npm install" only if there is any change made to pakage.json file so that the developer has all the required dependencies when pulling files from remote.
376
369
377
370
If you don't want this hook to run, you can manually opt out of this using the `no verify` flag while using the merge command(git pull):
0 commit comments