Skip to content

Commit 4f11c11

Browse files
committed
feat: corrected the markdown formate in INSTALLATION.md file
- improve readability of INSTALLATION.md file Signed-off-by: Bhudeo Krit <[email protected]>
1 parent 5fdeaf2 commit 4f11c11

File tree

1 file changed

+31
-37
lines changed

1 file changed

+31
-37
lines changed

INSTALLATION.md

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ This document provides instructions on how to set up and start a running instanc
1616
- [Installation using Docker](#installation-using-docker)
1717
- [Prerequisites](#prerequisites-1)
1818
- [Development Setup](#development-setup)
19+
- [Configuration](#configuration)
20+
- [Creating .env file](#creating-env-file)
21+
- [Setting up PORT in .env file](#setting-up-port-in-env-file)
22+
- [Setting up REACT_APP_TALAWA_URL in .env file](#setting-up-react_app_talawa_url-in-env-file)
23+
- [Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file](#setting-up-react_app_backend_websocket_url-in-env-file)
24+
- [Setting up REACT_APP_RECAPTCHA_SITE_KEY in .env file](#setting-up-react_app_recaptcha_site_key-in-env-file)
25+
- [Setting up Compiletime and Runtime logs](#setting-up-compiletime-and-runtime-logs)
26+
- [Post Configuration Steps](#post-configuration-steps)
27+
- [Running Talawa-Admin](#running-talawa-admin)
28+
- [Accessing Talawa-Admin](#accessing-talawa-admin)
29+
- [Talawa-Admin Registration](#talawa-admin-registration)
30+
- [Talawa-Admin Login](#talawa-admin-login)
31+
- [Testing](#testing)
32+
- [Running tests](#running-tests)
33+
- [Debugging tests](#debugging-tests)
34+
- [Linting code files](#linting-code-files)
35+
- [Husky for Git Hooks](#husky-for-git-hooks)
36+
- [pre-commit hook](#pre-commit-hook)
37+
- [post-merge hook](#post-merge-hook)
1938

2039
<!-- tocstop -->
2140

@@ -147,17 +166,17 @@ If you prefer to use Docker, you can install the app using the following command
147166
148167
Run the following command to build the Docker image:
149168
150-
````bash
151-
docker build -t talawa-admin .
152169
```bash
170+
docker build -t talawa-admin .
171+
```
153172
154173
3. Run the Docker container:
155174
156175
After the build is complete, run the Docker container using this command:
157176
158177
```bash
159178
docker run -p 4321:4321 talawa-admin
160-
```bash
179+
```
161180
162181
The application will be accessible at `http://localhost:4321`
163182
@@ -169,18 +188,16 @@ You can use our interactive setup script for the configuration. Use the followin
169188
170189
```bash
171190
npm run setup
172-
```bash
191+
```
173192
174193
All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file)
175194

176195
## Creating .env file
177196

178197
A file named .env is required in the root directory of talawa-admin for storing 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:
179198

180-
````
181-
199+
```
182200
cp .env.example .env
183-
184201
```
185202

186203
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
204221
Add the endpoint for accessing talawa-api graphql service to the variable named `REACT_APP_TALAWA_URL` in the `.env` file.
205222

206223
```
207-
208224
REACT_APP_TALAWA_URL="http://API-IP-ADRESS:4000/graphql/"
209-
210225
```
211226

212227
If you are a software developer working on your local system, then the URL would be:
213228

214229
```
215-
216230
REACT_APP_TALAWA_URL="http://localhost:4000/graphql/"
217-
218231
```
219232

220233
If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to
221234

222235
```
223-
224236
REACT_APP_TALAWA_URL="http://YOUR-REMOTE-ADDRESS:4000/graphql/"
225-
226237
```
227238

228239
## Setting up REACT_APP_BACKEND_WEBSOCKET_URL in .env file
229240

230241
The endpoint for accessing talawa-api WebSocket graphql service for handling subscriptions is automatically added to the variable named `REACT_APP_BACKEND_WEBSOCKET_URL` in the `.env` file.
231242

232243
```
233-
234244
REACT_APP_BACKEND_WEBSOCKET_URL="ws://API-IP-ADRESS:4000/graphql/"
235-
236245
```
237246

238247
If you are a software developer working on your local system, then the URL would be:
239248

240249
```
241-
242250
REACT_APP_BACKEND_WEBSOCKET_URL="ws://localhost:4000/graphql/"
243-
244251
```
245252

246253
If you are trying to access Talawa Admin from a remote host with the API URL containing "localhost", You will have to change the API URL to
247254

248255
```
249-
250256
REACT_APP_BACKEND_WEBSOCKET_URL="ws://YOUR-REMOTE-ADDRESS:4000/graphql/"
251-
252257
```
253258

254259
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
268273
Copy/paste this `reCAPTCHA site key` to the variable named `REACT_APP_RECAPTCHA_SITE_KEY` in `.env` file.
269274

270275
```
271-
272276
REACT_APP_RECAPTCHA_SITE_KEY="this_is_the_recaptcha_key"
273-
274277
```
275278

276279
## Setting up Compiletime and Runtime logs
@@ -286,27 +289,21 @@ It's now time to start Talawa-Admin and get it running
286289
Run the following command to start `talawa-admin` development server:
287290
288291
```
289-
290292
npm run serve
291-
292293
```
293294
294295
## Accessing Talawa-Admin
295296
296297
By default `talawa-admin` runs on port `4321` on your system's localhost. It is available on the following endpoint:
297298

298299
```
299-
300300
http://localhost:4321/
301-
302301
```
303302

304303
If you have specified a custom port number in your `.env` file, Talawa-Admin will run on the following endpoint:
305304

306305
```
307-
308306
http://localhost:${{customPort}}/
309-
310307
```
311308

312309
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
328325
You can run the tests for `talawa-admin` using this command:
329326
330327
```
331-
332328
npm run test
333-
334329
```
335330
336331
## Debugging tests
337332
338333
You can see the output of failing tests in broswer by running `jest-preview` package before running your tests
339334
340335
```
341-
342336
npm run jest-preview
343337
npm run test
344-
345338
```
346339
347340
You don't need to re-run the `npm run jest-preview` command each time, simply run the `npm run test` command if 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
353346
You can lint your code files using this command:
354347
355348
```
356-
357349
npm run lint:fix
358-
359350
```
360351
361352
## Husky for Git Hooks
@@ -368,15 +359,18 @@ We run a pre-commit hook which automatically runs code quality checks each time
368359

369360
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:-
370361
371-
git commit -m "commit message" --no-verify
362+
```
363+
git commit -m "commit message" --no-verify
364+
```
372365
373366
#### post-merge hook
374367
375368
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.
376369
377370
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):
378371

379-
git pull --no-verify
380-
381-
<br/>
382372
```
373+
git pull --no-verify
374+
```
375+
376+
<br/>

0 commit comments

Comments
 (0)