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
> Please ensure that you have completed the backend set-up [here](../README.md) before proceeding.
4
+
5
+
## Setting-up Question History Service
6
+
7
+
1. In the `qn-history-service` directory, create a copy of the `.env.sample` file and name it `.env`.
8
+
9
+
2. To connect to your cloud MongoDB instead of your local MongoDB, set the `NODE_ENV` to `production` instead of `development`.
10
+
11
+
3. Update `MONGO_INITDB_ROOT_USERNAME`, `MONGO_INITDB_ROOT_PASSWORD` to change your MongoDB credentials if necessary.
12
+
13
+
4. You can view the MongoDB collections locally using Mongo Express. To set up Mongo Express, update `ME_CONFIG_BASICAUTH_USERNAME` and `ME_CONFIG_BASICAUTH_PASSWORD`. The username and password will be the login credentials when you access Mongo Express at http://localhost:8083.
14
+
15
+
## Running Question History Service without Docker
16
+
17
+
> Make sure you have the cloud MongoDB URI in your .env file and set NODE_ENV to production already.
18
+
19
+
1. Open Command Line/Terminal and navigate into the `qn-history-service` directory.
20
+
21
+
2. Run the command: `npm install`. This will install all the necessary dependencies.
22
+
23
+
3. Run the command `npm start` to start the Question History Service in production mode, or use `npm run dev` for development mode, which includes features like automatic server restart when you make code changes.
24
+
25
+
## After running
26
+
27
+
1. To view Question History Service documentation, go to http://localhost:3006/docs.
28
+
29
+
2. Using applications like Postman, you can interact with the Question History Service on port 3006. If you wish to change this, please update the `.env` file.
0 commit comments