ngoworldcommunity / NGOWorld

A platform to connect and support NGOs, charities and you to build a better tomorrow.
https://ngoworld.org
MIT License
353 stars 412 forks source link

Feature: Use .env file for Port, Network Expose and remove React Scripts #1230

Open developerTested opened 4 months ago

developerTested commented 4 months ago

Description

Currently package.json contain React-Scripts which is not being used in my view.

Vite development Port is set in package.json and Vite.config.js which is HardCoded so it should be .env file based so if repo update user changes regrading PORT and NETWORK expose shouldn't be override by updates.

Proposed Solution

  1. Remove port from package.json and vite config
  2. Remove React-Scripts

Screenshots

No response

🥦 Browser

Mozilla Firefox

Checklist ✅

github-actions[bot] commented 4 months ago

Hello @developerTested, thank you for raising the issue.

Currently, the issue is marked as https://github.com/MilanCommunity/Milan/labels/status%3A%20todo%20%E2%8F%B3 so please wait until the maintainers/owner review it and provide you with feedback/suggestions to proceed further.

Feel free to reach out to Tamal on Twitter, or drop a mail at tamalcodes@gmail.com if you think that this issue is of critical priority.

Give us a ⭐ to show some support Happy OpenSource 🚀

r0ld3x commented 4 months ago

I think vite --port 3000 solves this problem

developerTested commented 4 months ago

I think vite --port 3000 solves this problem

You're but that is issue because that is hardcoded in package.json which can be overridden when thee is an update in package.json so to bypass that u need to store it somewhere user have control over it.

Check repo package.json and vite.config.js there its Hardcoded.

if we use .env file no user change will be overridden which is main aim of this issue

tamalCodes commented 4 months ago

Hey @developerTested , this is a good DX - please start working on the same.

Also yes, I guess we never removed the unused dependencies - while you are at it, do remove the unused ones. Add documentation and update .env.example for the same.

📑 Checklist in case you missed something

Please maintain structure, use conventional pull request titles, and avoid spam to avoid closure or bans.