Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to host HTML node.js application

How to host HTML node.js application

Problem

i have developed a simple webapp using socket.io and node.js and was wondering how i would deploy it to a server? My application uses an HTML file with a canvas element the user interacts with how would i deploy this, the css and the js files and the app.js file to the server?

thanks

Problem courtesy of: user1851487

Solution

In some hosting companies that support Node.js (like Nodejitsu and Heroku) you can deploy your static files as part of your application code. In other words, when you deploy your app both your code and static files (JS/CSS/Images) will be deployed.

The downside with this approach is that you cannot easily just change a CSS file like you can in a more traditional deployment where you can just FTP a new CSS file to the production server. You could bypass this if you host your CSS files somewhere else, though.

I don't have experience with AppFog but I suspect the same is true.

Solution courtesy of: Hector Correa

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

How to host HTML node.js application

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×