Comments (5)
Regarding the environment variables, are there any particular advantages? If so, I would consider adding some as presets which can be toggled in the start options. Allowing to set every env variable would be out of scope of this plugin.
from capacitor-nodejs.
My app is built like https://12factor.net/ (except secrets can come from things like docker or vault nowadays). The database url (sqlite in this case) mounted path and other things come from env variables.
from capacitor-nodejs.
I wasn't exactly clear what I wanted the signature to look like. Something like https://nodejs.org/api/child_process.html#child_processspawncommand-args-options , but obviously it's not a being treated as a child process here so we can omit most of the args.
so it'd look like
// this is basically node's definition of process.env minus the generic
interface EnvVars {
[key: string]: string | undefined;
}
interface StartOptions {
env: EnvVars;
// any other options could be added here, like cwd
}
// not really tied to this name
start(fileName: string, args: string[], opts: StartOptions)
from capacitor-nodejs.
I like your idea. However, this wouldn't work with the current ElectronJS integration as it is. Therefore the implementation will take some time.
from capacitor-nodejs.
Added in v1.0.0-beta.4
You can now use the startMode
configuration and the start()
method to manually start the Node.js runtime. In addition, arguments can be passed to the main script and environment variables for the Node.js runtime can be set.
from capacitor-nodejs.
Related Issues (20)
- Separate example projects in a new repo HOT 2
- npm install failed HOT 2
- Cannot find module 'bridge' on Android HOT 1
- Upgrade to CapacitorJS v5
- Rewrite the Bridge package in TypeScript
- Start the node.js runtime as child process on ElectronJS
- support for native node modules build HOT 5
- Did you rebase the main branch? HOT 1
- How does one use the new builtin bridge package from the node project? HOT 6
- Add a method to stop nodejs HOT 1
- How to use manual mode start? HOT 4
- iOS support? HOT 13
- How do I use this plugin in Quasar's capacitor. HOT 3
- Any way of debugging the nodejs code? HOT 5
- Execution failed for task ':capacitor-nodejs:compileDebugJavaWithJavac'. > error: invalid source release: 17 HOT 4
- Could not run on device only in debug mode HOT 5
- node.js upgrade HOT 10
- Add TypeScript Declaration File for Bridge Package HOT 1
- Example Project HOT 8
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 capacitor-nodejs.