Diogenes
Diogenes

Reputation: 2757

How can you starting and stop a meteor server remotely?

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?

Upvotes: 3

Views: 2706

Answers (1)

Tarang
Tarang

Reputation: 75945

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!

Upvotes: 2

Related Questions