Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3457316
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:50:44+00:00 2026-05-18T09:50:44+00:00

In the CouchDB Definitive Guide the author says you could use: // !json templates.edit

  • 0

In the CouchDB Definitive Guide the author says you could use:

// !json templates.edit
// !json blog
// !code vendor/couchapp/path.js
// !code vendor/couchapp/template.js

But why use those macros when you can use require()?

Are there occasions I want to use the macros instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:50:45+00:00Added an answer on May 18, 2026 at 9:50 am

    Basically this is only of interest when using CouchDB with CouchApp.

    It allows for easier separation of the data from the show function.
    Normally CouchDB uses the Mozilla’s SpiderMonkey JavaScript Engine to render the views, therefore there is not CommonJS implementation available.

    Basically CouchApp allows you to use those JavaScript “show” function (which are stored in the DB) for rendering out HTML.

    So in terms of Node.js, no it doesn’t really make sense to use the macros. Also, I quickly looked through the soruce of two of the available CouchDB modules for Node.js, and I couldn’t find any support for the macros, which further indicates that this is some CouchApp specific functionality.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: What is the etymology of 'slug'? In CouchDB definitive guide the author
After reading this paragraph in the CouchDB Definitive Guide ( here ): If you
I am working on a project that is going to use CouchDB for flexible
Can .NET (managed code) read and write to CouchDB? I would like to build
If I use couchDB with a Javascript webpage. Do I still need PHP? How
I would like to use CouchDB to store some data for me and then
I'm trying to understand CouchDB and couchapp, and as I'm going through I'm seeing
I appreciate a lot CouchDB attempt to use universal web formats in everything it
Though I use CouchDB-specific JQuery verison, the problem can appear to be not related
Couchbase announced changes to CouchDB distribution: http://blog.couchbase.com/couchbase-2011-year-review CouchBase Single server has GeoCouch integration, is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.