1

I'm going through this CouchDB tutorial that references a few files - /_utils/script/jquery.js and /_utils/script/jquery.couch.js - that are supposed to be included.

<!DOCTYPE html>
<html>
  <head><title>Tiny CouchApp</title></head>
  <body>
    <h1>Tiny CouchApp</h1>
    <ul id="databases"></ul>
  </body>
  <script src="/_utils/script/jquery.js"></script>
  <script src="/_utils/script/jquery.couch.js"></script>
  <script>
    $.couch.allDbs({
      success : function(dbs) {
        dbs.forEach(function(db) {
          $("#databases").append('<li><a href="/_utils/database.html?'+db+'">'+db+'</a></li>');
        });
      }
    });

  </script>
</html>

When I run the Tiny CouchApp through Fauxton, I get 404 errors for those files. I'm wondering if they have moved since the tutorial was written (around 2012), but I haven't been able to find much more up-to-date documentation.

shruggie
  • 33
  • 3

1 Answers1

1

Please check out their official documentation for updated examples.

Fauxton is coded using React and does not ship with jQuery. (but you really shouldn't rely on your database to serve you some JS)

Dominic Barnes
  • 28,083
  • 8
  • 65
  • 90
  • Is there an updated example in the official documentation? I'm having trouble finding one. I'm looking through the newer docs and a lot of it seems incomplete, and a lot of it seems copied from the older [Definitive Guide](http://guide.couchdb.org/editions/1/en/index.html), minus the example app. Also, isn't the whole angle of this CouchApp thing that the DB can serve HTML+JS without needing a frontend server? I mean, it's weird to me, and that's why I'm trying to through the tutorials and docs. But it seems they're in a state of flux. Has the CouchDB attitude changed in the switch to 2.0? – SleepyMurph Jun 23 '17 at 14:09
  • CouchApps are totally still in style! I wasn't suggesting that you _don't_ host HTML/JS/CSS via CouchDB, only that you should probably upload your own assets and not depend on the one that CouchDB uses for it's own UI, as the library can change at any time (and it did). – Dominic Barnes Jun 24 '17 at 05:16