Prateek Agarwal Prateek Agarwal - 1 year ago 87
Javascript Question

What the best way to deploy javascript based web app?

I'm a j2ee developer and till now I've deployed web apps in Tomcat, Weblogic and many App Servers, which were completely j2ee based.

Now I'm developing a Javascript based app that uses require js for module, QuickBlox and Firebase JS.

Now what are my options to deploy them so that a user can use them for chatting purpose like via

We are using Amazon's cloud platform EC2(I'm new to it).

Answer Source

From my experience, NodeJS is the way to go if your application will be a Single-page application. NodeJS will give you the ability to manipulate your application on the fly in the server side with pure JavaScript if necessary.

To start with, you can use ExpressJS to serve your files. From ExpressJS documentation:

var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('Hello World!');

app.listen(3000, function () {
  console.log('Example app listening on port 3000!');

The app starts a server and listens on port 3000 for connections.

Read the ExpressJS docs for more information. There is a lot of ways to serve files in NodeJS. You can search for more in

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download