I have developed a Meteor app. I would like to package this app in the node-webkit app runtime for Chromium. I need the Meteor server process to run locally. How would I go about starting the Meteor server process when a user launches the node-webkit app?
I know I can start a NodeJS server instance with node-webkit like this:
server.js
#!/usr/bin/env node
require('http').createServer(function(req, res) {
res.writeHead(200, {'content-type': 'text/html'});
res.end('<h1>sup</h1>');
}).listen(9000, '127.0.0.1');
Then if I run:
$ nw ./
node-webkit will start the NodeJS server and launch the node-webkit instance. I'm not including the package.json file here, but it essentially just says look at http://127.0.0.1:9000
.
So, how would I go about writing that server.js
file to start the Meteor instance while the node-wekkit app is running?
Thanks for any thoughts.