Titan

Titan is the full user-facing front end for your Tilas platform which is built completely on the Spartan API. It can be thought of as the front-end blog which your users will interact with. It's a fully responsive front-end that is highly customisable using environment variables and a configuration file. On top of standard blogging features (e.g. articles, posts, images, tagging, authors etc), it also comes with cool features like social media share links, adsense, google analytics and an automatic sharing (AutoShare) feature that will manage your facebook sharing on a schedule (when configured via the Lantern CMS).


Settings up Titan on your Server:


Prerequisites:

Titan Software Installation (Source Setup)

For below example, let assume our new site is called "funnycatsblog"

Environment Variables:

Site Specific Configuration:

Updating server ports (optional step; if not done it will default to port 3000):

Start your app:

Site Specific Styling:

TITAN IS NOW UP AND READY TO SERVE FOR PUBLIC ACCESS. YOUR NEXT STEP WOULD BE TO SETUP LANTERN.


Development Tips


Debugging: To effectively debug your nodeJS app, I prefer to use node-inspector which pretty much lets your perform JavaScript debugging like you are used to in Chrome Dev Tools. To debug this app using node-inspector do this:

$ node --debug app.js // start your app in debug mode

$ node --debug-brk app.js // or to to pause script on first line do this

Now:

$ node-inspector & //launch the inspector

Read more here : https://greenido.wordpress.com/2013/08/27/debug-nodejs-like-a-pro/

Logging This app uses Bunyan for logging. This is a very advanced logging system that stores machine readable logs if needed. When the app runs, user friendly logs are spit out on the console to log our all trace (info and above), but it can be setup to only log to a file instead of the console or log on warns and above. There are more advanced use cases as well.

To prob apps in production, more here : https://www.joyent.com/blog/node-js-in-production-runtime-log-snooping

Read more here : https://github.com/trentm/node-bunyan