Skip to content

feat: added port and network expose and removed react-scripts #1234

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Set the port to run Vite Developemnt Server
PORT=3000

# Use Host Name for Vite
HOST_NAME=localhost

# Expose Vite to Network
# Set to true to expose the Vite application to the network, allowing access from other devices on the same network.
EXPOSE_NETWORK=false

# Use the Backend Setup guide to setup the backend and then use the following:
VITE_MILANAPI="http://localhost:5000"

Expand Down
6 changes: 5 additions & 1 deletion docs/FrontendSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ Follow the below steps to setup the Frontend locally. We are using `npm` as the

## Setting up the `.env` file

We use a `.env` file using the `dotenv` package inside the root of the directory. You must create a `.env` file similar to [.env.example](../.env.example) file.
We use a `.env` file inside the root of the directory. You must create a `.env` file similar to [.env.example](../.env.example) file.

`HOST_NAME` variable is used to set host name which tell vite to use and listen to only.

`EXPOSE_NETWORK` This variable use to tell vite to listen to ur Network IP address and localhost. it useful if you want to access your vite server directory from your network just like how Webserver and FTP/SFTP used to listen on network.

<br/>
<br/>
Expand Down
Loading