added an insert statement to create the design doc and view and using the view method on nano