The Node App
Clone this wiki locally
How we built the backend
The server side part of the tool is a NodeJS based application that uses the express web framework. The main entry point for the application is in
server.js which loads and runs the application defined in
Directory structure and code layout
The main entry point for the app. When you run
node server, this is the file that is invoked. In fact, the entire file is just three lines:
var builder = require('./lib/application'); var app = builder(); app.run();
Contains configuration files that are required for running the tool. The primary file in this directory is
config.json, which defines the initial database connection details, and some environment options for the tool (such as whether ffmpeg is available in the deployment environment).
Contains application module and the main sub-modules for the authoring tool. For more details on these modules go here.
All the different plugin types for the tool itself (authentication, file storage, output, and content plugins) are located here.
If you want to implement a plugin for the tool, say an Amazon S3 file storage plugin (yes please!), your plugin will be installed here (e.g. to
Routes that are not related to the REST api are defined in this directory. The structure is similar to the layout suggested by the authors of the ExpressJS framework in this video. The idea is that routes defined in this directory can be browsed to directly.