How can you starting and stop a meteor server remotely?


Question

I'm using meteor. You can run the meteor server with meteor run. Lets say I have my own server (unix) somewhere I can ssh into. I have a build script that copies the latest source from a git repo onto that server. I need that script to stop the last running meteor server, and start the new one after transferring the files. What's a good way to start and stop the meteor server programatically?

1
2
1/11/2013 7:45:21 PM

Accepted Answer

Meteor is built ontop of Node.js. you could always create a script that looks for node.js and exits it (bash script). I've never personally tried it but there is a node command called process.exit() within meteor.

Also keep in mind using meteor run is for development. Once you bundle your package up its run off of node.js

Also have alook at a project called meteorite (https://github.com/oortcloud/meteorite) which you could also get to update packages off of git as well your meteor itself

Edit: I forgot about meteor's magical ability to scan for file changes and automatically update these to the client with minimum interruption without having to restart too!

1
1/11/2013 8:42:46 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon