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
- The test suite uses [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite) for running firestore for tests([documentation](https://firebase.google.com/docs/emulator-suite/install_and_configure)).
108
+
- Pre-requisites:
109
+
- Node.js version 8.0 or higher.
110
+
- Java version 1.8 or higher.
111
+
- Firebase CLI: `npm install -g firebase-tools`
112
+
113
+
## Using Firebase Emulator Locally
114
+
- [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite) can be used locally as the DB for the project
115
+
- Pre-requisites:
116
+
- Node.js version 8.0 or higher.
117
+
- Java version 1.8 or higher.
118
+
- Firebase CLI: `npm install -g firebase-tools`
119
+
- Run: `firebase emulators:start`
120
+
- The emulator will be running on the port: 8080
121
+
- You can view the emulator UI at: `http://localhost:4000`
122
+
94
123
## Pull request guidelines
95
124
- Ensure that the tests pass locally before raising a PR.
96
-
- All pull requests should be to the develop branch.
125
+
- All pull requests should have base as the develop branch.
97
126
- Every pull request should have associated issue(s) on our [issue tracker](https://github.com/Real-Dev-Squad/website-backend/issues).
98
127
- For any non-trivial fixes and features, unit and integration tests must be added. The PR reviewer should not approve/merge PR(s) that lack these.
99
128
- The PR(s) should be merged only after the CI passes.
Copy file name to clipboardExpand all lines: README.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,24 +17,31 @@
17
17
This Project serves the backend APIs required for [Real Dev Squad](https://realdevsquad.com/) web projects. This project is built in [Express.js](https://expressjs.com/).
18
18
19
19
## Running the Project
20
-
```shell script
20
+
```shell
21
21
$ npm install
22
-
$ npm start
22
+
$ npm start
23
23
```
24
24
#### Running in dev mode
25
-
```shell script
25
+
```shell
26
26
$ npm run dev
27
27
```
28
28
29
+
#### Test local setup
30
+
```shell
31
+
$ npm run test-config
32
+
```
33
+
29
34
## Prerequisites
35
+
- The application uses [node-config](https://github.com/lorenwest/node-config)([documentation](https://github.com/lorenwest/node-config/wiki/Configuration-Files)) for managing config.
30
36
- Create a new file: `config/local.js`. Override the required config values from `config/development.js` and `config/default.js` into `config/local.js`.
31
37
- Register the application for [GitHub OAuth](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps) to get the `clientId` and `clientSecret`. Add the callback URL as `http://<HOSTNAME>:<PORT>/auth/github/callback`
32
-
- Create an application on [FireStore](https://firebase.google.com/docs/firestore) and [generate a service file](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Add the service file with the name `firestore-private-key.json` in the project root.
33
-
- Make sure your local development setup is working properly by running the following command: `npm run test-config`.
38
+
- Create an application on [FireStore](https://firebase.google.com/docs/firestore) and [generate a service file](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). Add the service file with the name `firestore-private-key.json` in the project root.
34
39
35
40
## API Documentation:
36
41
- Run the server and navigate to `http://<HOSTNAME>:<PORT>/api-docs` to view the API documentation.
37
42
- Alternatively, you can import the file [API Schema](https://github.com/Real-Dev-Squad/website-backend/blob/develop/public/apiSchema.json) to [Postman](https://www.postman.com/) or [SwaggerHub](https://swagger.io/tools/swaggerhub/).
38
43
- If any API changes have been made:
39
44
- Write JS Doc on top of your routes using YAML based annotations in OPEN API 3.0 format.
40
45
- Run `npm run generate-api-schema` to generate the API schema. A file `public/apiSchema.json` will be created/updated.
46
+
47
+
Read more about contributing to the project: [CONTRIBUTING](CONTRIBUTING.md)
0 commit comments