Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read port dynamically in api #134

Closed
4 tasks
rajdip-b opened this issue Feb 10, 2024 · 9 comments · Fixed by #170
Closed
4 tasks

Read port dynamically in api #134

rajdip-b opened this issue Feb 10, 2024 · 9 comments · Fixed by #170
Assignees
Labels
good first issue Good for newcomers scope: api Everything related to the API type: enhancement New feature or request
Milestone

Comments

@rajdip-b
Copy link
Member

Description

image

We would like to give users the option to update the port from the environment without needing to alter any code. This will involve changing the main.ts and Dockerfile files.

Solution

  • Create an environmental variable named API_PORT
  • Add it to .env.example
  • In the main.ts file, read this environmental variable. If it's not set, default the port to 4200
  • In the Dockerfile, update the EXPOSE 4200 to EXPOSE ${API_PORT:-4200}

Additional context

All the related files are stored under apps/api

@rajdip-b rajdip-b added type: enhancement New feature or request good first issue Good for newcomers scope: api Everything related to the API labels Feb 10, 2024
@rajdip-b rajdip-b added this to the Release v1 milestone Feb 10, 2024
@rajdip-b rajdip-b moved this to Todo in keyshade-api Feb 10, 2024
@Aditya-Ghosh-27
Copy link

i am solving this issue asap

@Aditya-Ghosh-27
Copy link

/attempt

Copy link

Assigned the issue to you!

@rajdip-b
Copy link
Member Author

@HarshPatel5940
Copy link
Contributor

@Aditya-Ghosh-27 what are the updates with this issue? Let's get this once completed soon.

@Aditya-Ghosh-27
Copy link

Aditya-Ghosh-27 commented Feb 27, 2024 via email

@Animesh7853
Copy link
Contributor

/attempt

Copy link

Assigned the issue to you!

@rajdip-b rajdip-b moved this from Todo to In progress in keyshade-api Mar 19, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in keyshade-api Mar 21, 2024
@rajdip-b
Copy link
Member Author

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers scope: api Everything related to the API type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants