Thursday, August 21, 2014

Goddady wildcard subdomain url call handling

If I type in the browser www.jhonjairoroa87.com, the blog is shown. But when I type test.jhonjairoroa87.com, there was no page loaded. So iI wabnted to enable the routing from anysubdomain.jhonjairoroa.com to this blog.

So, the solution was:

Go to GoDaddy's DNS Manager, the first table on top should say A(Host), click the button under that first table that says Quick Add. In the first text field, enter an asterisk (*), in the second one, the IP address to redirect to (the same one you have for the @ record on top). Click "Save Zone File" on top-right and confirm.

This creates a catch-all record to anysub.yourdomain.com.

Reference: 

Friday, August 1, 2014

RequireJS: Uncaught Error: Module name "underscore" has not been loaded yet for context: _. Use require([])

I was getting the error

Uncaught Error: Module name "underscore" has not been loaded yet for context: _. Use require([])

Solved it adding the shim values in the require js config:

require.config({
    paths:{
        jquery:'jquery/jquery-min',
        underscore:'underscore/underscore-min',
        backbone:'backbone/backbone-min'
    }, 
    // here
    shim: {
        underscore: {
            exports: '_'
        },
        backbone: {
            deps: ["underscore", "jquery"],
            exports: "Backbone"
        },
        waitSeconds: 15
    }
});

Source: http://stackoverflow.com/questions/16774214/trouble-combining-require-js-and-backbone-js-underscore-js