2

I'm following this guide on installing a node.js application on Azure: http://www.windowsazure.com/en-us/develop/nodejs/tutorials/create-a-website-(mac)/#header-0

Is it possible to get a sails.js app running without having to instantiate a Virtual Machine?

Joe Hill
  • 333
  • 3
  • 12
amhed
  • 3,649
  • 2
  • 31
  • 56

2 Answers2

5

New guide on deploying to Windows Azure:

https://github.com/mdrmuhaimin/sails-docs/blob/b1030c21daf885e6490e1d1f946375a5c8584e4c/Guide:Deploying-Sails-to-windows-azure-linux-vm.md

Also, as I mentioned in the comment above, you don't have to install Sails globally to deploy it-- just clone your app, run npm install, and then forever start app.js or node app.js. See the deployment guide for more info.

mikermcneil
  • 11,141
  • 5
  • 43
  • 70
  • 1
    Link died, found the link myself: https://github.com/mdrmuhaimin/sails-docs/blob/b1030c21daf885e6490e1d1f946375a5c8584e4c/Guide:Deploying-Sails-to-windows-azure-linux-vm.md If that dies, find through navigating to https://github.com/balderdashy/sails-docs/ and search for azure -> issues -> Guide: Deploying sails app to azure ubuntu vm -> Files changed -> View There you go :) or see pastebin here: http://pastebin.com/ErdLnvFH – Michael Crook Oct 02 '14 at 21:05
  • This is actually not an ideal way to solve the problem. Those who use Azure basically want to benefit from scalability, that is, hoping SailsJS deployments to scale swiftly, not by manually scripting. Anyway, start-up scripts might be to the rescue. BTW, sails deploy looks really promising. I hope it can ship soon. – Isilmë O. Mar 18 '15 at 15:20
2

As of right now sails requires an npm install -g on the box which would require either a virtual machine or a cloud service with a startup script. The link you are showing if for a deployment model where you don't get any access to manipulate the host since there are many instances running on it.

It would be great if sails could be included inside an app by putting it in the package.json and started up from within the app.

UPDATE - This has changed since the answer was posted. @mikermcneil has an updated answer that reflects the current state.

Dennis Burton
  • 3,282
  • 3
  • 23
  • 30
  • I can setup a start script for node on a cloud service? so far I've only used cloud instances with ASP.NET projects and Visual Studio takes care of most of the packaging and configuring using the IDE – amhed Jul 03 '13 at 22:25
  • Yes. Startup Tasks are created in the csdef file which can exist for node deployments as well. The Startup task will point to a cmd/ps1 file that will need to be part of your deployment. Keep in mind that you can place you node app in either a worker role or a web role. The web role will run inside iisnode while node (probably connect) will handle request directly in a worker role. – Dennis Burton Jul 04 '13 at 01:37
  • 1
    Check out the Powershell tool for creating the web/worker roles Add-AzureWebRole. This will get you started. – Dennis Burton Jul 04 '13 at 01:40
  • Why doesn't it work on a regular website adding the dependencies on the package.json file? sails needs to be installed globally in order to work? – amhed Jul 22 '13 at 00:58
  • @amhed that is correct. The global install is required in addition to pulling in the dependencies in the package.json. There is no way to do the global install in WAWS. With Clould Services, you can set up a startup script to do that install. – Dennis Burton Jul 22 '13 at 03:41
  • @DennisBurton - you don't have to install Sails globally to deploy it-- just clone your app, run `npm install`, and then `forever start app.js` or `node app.js`. See the [deployment guide](https://github.com/balderdashy/sails-docs/blob/master/deployment.md) for more info – mikermcneil Mar 03 '14 at 05:41