Skip to content

Commit

Permalink
feat(env.example): update example environment variables with default …
Browse files Browse the repository at this point in the history
…values for easier setup

fix(api.http): change year in stocks endpoint from 2023 to 2015 for testing purposes
chore(docker-compose): add initialization scripts volume and set MongoDB environment variables for better configuration
  • Loading branch information
Abdullah Alqahtani committed Dec 28, 2024
1 parent cfbf9b4 commit 8470383
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
API_VERSION=
ENVIRONMENT=
PORT=
APP_NAME=
APP_DESCRIPTION=
MONGO_URI=
MONGO_DATABASE=
API_VERSION=1.0.0
ENVIRONMENT=development
PORT=3000
APP_NAME="Naqa API"
APP_DESCRIPTION="Naqa API is a RESTful service designed to provide data on the purification process of Saudi stocks."
MONGO_URI="mongodb://mongodb:27017"
MONGO_DATABASE="naqa"
2 changes: 1 addition & 1 deletion api.http
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GET {{baseUrl}}/
Content-Type: {{contentType}}

### Get Stocks by Year
GET {{baseUrl}}/api/v1/stocks/year/2023
GET {{baseUrl}}/api/v1/stocks/year/2015
Content-Type: {{contentType}}

### Search Stocks with Parameters
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ services:
- "${MONGO_PORT:-27017}:27017"
volumes:
- mongodb_data:/data/db
- ./sources:/docker-entrypoint-initdb.d
environment:
- MONGO_INITDB_DATABASE=${MONGO_DATABASE}
command: mongod --bind_ip_all
networks:
- naqa-network

Expand Down

0 comments on commit 8470383

Please sign in to comment.