Comments (6)
from lightning-cli.
@mattiapontonio, thank you for reply.
In my case, I have two different API endpoints (test, prod)
For instance, when I'm running 'lng dev' command, the dist folder is being created, and local server launches.
But It would be nice to pass a local variable that indicates whether to use prod URL or DEV URL
instead of each time manually change URL value before building dist folder
from lightning-cli.
I agree. But as mention in the comment lng dev is just a "bonus". You can simply build and serve the folder via Your own Node server with your configs.
Side note: serving the app Is not mandatory that is served from the same server of the API so this is a Front End issue managable via some configs file. Is not a CLI serving issue, Is a build issue relative to the files that your are going to build. I think.
from lightning-cli.
There are some plans to implement environment variables, that could come in handy for these type of cases. It's currently in local development. No ETA yet.
from lightning-cli.
A quick and easy solution could be spread [options]
from CLI process using argv to the http-server
directly.
from lightning-cli.
Support for environment variables are added in Lightning-CLI v1.7.0
https://github.com/rdkcentral/Lightning-CLI#environment-variables
from lightning-cli.
Related Issues (20)
- Build error from esbuild when there is a dependency on crypto-js HOT 2
- LNG_LIVE_RELOAD missing in documentation HOT 1
- Husky's pre-commit hook is not working after `lng create` HOT 1
- App Identifier error while Uploading the code to Metrological HOT 1
- CLI CI/CD Compatibility ( lng upload ) HOT 1
- App bundle created with esbuild is not exposing a constructor HOT 1
- .gitignore getting written every time we run a build HOT 3
- _states() is broken for esbuild bundle when NODE_ENV=production HOT 2
- Allow using a different .env than the one on the root folder HOT 3
- `process` is not defined when `LNG_BUNDLER=esbuild` HOT 1
- Issue with CLI : HOT 3
- Build fails due to path to rollup being incorrect HOT 1
- LNG DIST ignores esEnv parameter in settings.json HOT 2
- Create generates App.js with License in it HOT 8
- Sourcemap not generating by default when we use esbuild bundler
- Please implement lng dev option to not open a browser window each time it is run. HOT 2
- [ENV Variables] Process is undefined when trying to access Environment variables with Rollup
- Sourcemaps in production? HOT 2
- Compilation issue in mixed js/ts projects for const enums HOT 2
- Default value for LNG_BROWSER_BUILD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning-cli.