Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
md-redwan-hossain committed Nov 21, 2023
1 parent 646b146 commit 1dd3948
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ This API will provide Division, District, Sub-District related data of Banglades

## Where to use

- Data provided by this API are frequently used in web applications where Geographical data is utilized.
- Data provided by this API are frequently used in web applications where Geographical data is utilized.

## Why the API is read only?

- To enable `POST` or `PATCH` request, authentication needs to be added which will be too much opinionated.
- The database can be manipulated directly by SQL query or via separate API backend where proper authentication strategy is being used according to the business demand.

## How to run
- For API documentation, `/swagger` go to endpoint.

- The preferred way to use the API is docker. However, you need dotnet 7 to run the source code.
- For API documentation, go to `/swagger` endpoint.
- If any package is missing, simply run:

```bash
Expand All @@ -27,7 +33,7 @@ dotnet restore

## Running from compiled binary

- If you want to run from single executable self-contained binary, port conflict may occur. Simply add the following lines in `appsettings.json` to configure the port of kestrel server.
- If you want to run from single executable self-contained binary, port conflict may occur. Simply add the following lines in the existing json object of `appsettings.json` to configure the port of kestrel server.

```json
"Kestrel": {
Expand All @@ -41,5 +47,5 @@ dotnet restore

## Environment variable

- To store sensitive data in environment variable fashion, you can create `secrets.json` in the parent directory (where `Program.cs` is located) and add any valid json value there.
- To store sensitive data in environment variable fashion, you can create `secrets.json` in the parent directory (where `Program.cs` is located) and add any valid json value there.
- To load data from `secrets.json`, set `"USE_SECRETS_JSON"` to `true` in `appsettings.json`

0 comments on commit 1dd3948

Please sign in to comment.