startup.js

/**
 * Add your startup setup and modules to be loaded on startup here
 * @module app/startup
 */
define([
        'jquery',
        'dragula',
        'knockout',
        './router',
        'helpers',
        'pouchdb',
        'customBindings',
        'components/index',
        'bootstrap',
        'bootstrap-sidebar',
        'bootstrap-colorpicker',
        'knockout-projections',
        'ko-amd-helper',
        'ko-postbox',
        'ko-mapping',
        'select2',
        'lodash',
        'bootstrap-tagsinput',
        'typeahead',
        'models/competencydb',
        'models/storage',
        'common'
    ],
    function($, dragula, ko, router, helpers, PouchDB) {
        // Add the Laravel X-CSRF-TOKEN to the ajax setup
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });
        setTimeout(function() {
            ko.postbox.publish('OLDuser.emHash', ['karl']);

        }, 300);
        // ko.postbox.publish('app.ready', true);
        // [Scaffolded component registrations will be inserted here. To retain this feature, don't remove this comment.]

        ko.amdTemplateEngine.defaultSuffix = '.html';
        // Start the application
        ko.applyBindings({
            route: router.currentRoute
        });
    });