optscale icon indicating copy to clipboard operation
optscale copied to clipboard

How to start services in local like NGUI with VITE_proxy in .env?

Open shadabmalik096rs opened this issue 11 months ago • 2 comments

shadabmalik096rs avatar Mar 05 '24 05:03 shadabmalik096rs

Hello @shadabmalik096rs

Here's a small guide to help you get started

  1. Navigate to NGUI Directory:
cd ngui/ui
  1. Configure Environment Variables: Ensure that you set up the necessary environment variables. For local development, it should be sufficient to specify the VITE_PROXY variable. For detailed guidance on configuring the VITE_PROXY variable, please refer to this link.

  2. Install Dependencies: Make sure you have pnpm and node installed, we are currently using [email protected] and [email protected]

pnpm i --frozen-lockfile
  1. Start NGUI Project:
pnpm start

ek-hystax avatar Mar 05 '24 08:03 ek-hystax

Yes ngui for front end But i want make changes in rest_api classes and test them via postman in my local machine?

shadabmalik096rs avatar Mar 06 '24 08:03 shadabmalik096rs

You may build the custom version of the rest_api.

  1. add your code to optscale repo
  2. run . build.sh rest_api from optscale folder to build the new rest_api:local image on your local machine
  3. delete current restapi pod via kubectl delete pod

The new restapi pod will include your changes.

nk-hystax avatar Sep 02 '24 12:09 nk-hystax