How to deploy total.js app to production and how to use appname instead of root base

604 views
Skip to first unread message

Jani Juusola

unread,
Jun 17, 2015, 8:33:39 AM6/17/15
to tot...@googlegroups.com
Nice to have examples/tutorials:
    - how to deploy application to live(production).
         -Ex. nginx? upstreams/reverseproxy(multiple node app to give more threads for users )?  /  (apache)...

Q:
    - actually I have one question too:
         - when i deploy application to server and application base url is like localhost/appname/ like question http://stackoverflow.com/questions/4375554/is-it-possible-to-set-a-base-url-for-nodejs-app
              - any special solution in total.js or need to fill all urls and routes with appname(with CONFIG('appname'))


- JaniJ

Peter Širka

unread,
Jun 17, 2015, 12:49:44 PM6/17/15
to tot...@googlegroups.com, triple....@gmail.com
Hi Jani,
thanks.

How to deploy application to live (production)?
I recommend to use own VPS (virtual private server) --> best configuration: UBUNTU, NGINX (as reverse proxy) + node.js. Why? You can run multiple web applications in one server and it's cheaper than shared hosting.

total.js doesn't know base URL, but you can define full (with base URL) relative URL and total.js will work same than express.js:

E.g.:

total.js app 1:

F.route('/app1/', view_index);
F
.route('/app1/contact/', view_contact);


total.js app 2:

F.route('/app2/', view_index);
F
.route('/app2/contact/', view_contact);

And you run both applications on same hostname. Do you understand?
Thanks!

dko...@gmail.com

unread,
Aug 26, 2015, 1:35:24 PM8/26/15
to total.js - web framework for node.js
Hello Jani,

For deploy to production question, I have been successful using Total.js + AWS Windows Server + IIS + IISnode. It's tricky to set up , but is an alternative for an IT environment that requires Windows (not my choice). And of course, if it works on IIS+IISnode, it can be deployed to Azure cloud Web App or into a vm.

frans....@gmail.com

unread,
Jan 10, 2017, 4:41:10 PM1/10/17
to total.js - web framework for node.js
Hello David,

Would you be so kind to share your setup on windows? We are trying the same but we cannot manage total.js to listen on named pipe instead of ip + port

Frans

David J. Kordsmeier

unread,
Jan 10, 2017, 4:59:18 PM1/10/17
to frans....@gmail.com, total.js - web framework for node.js
Sure thing

- Yes, frustrating stuff if you don't look at the default config values used

In your config-release (we use config, config-debug, config-release)
default-ip                      : auto
default-port                    : auto

In your run script release.js (we use release.js and default.js respectively):

var fs = require('fs');
var options = {};
options.ip = 'auto';
options.port = process.env.PORT;
var framework = require('total.js');
framework.http('release', options);

NOTE: We haven't ported our code base to the latest, we are still running on an older version.


--
You received this message because you are subscribed to a topic in the Google Groups "total.js - web framework for node.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/totaljs/KW2XG3z3cGQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to totaljs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages