How to use the meta.html function in meta

To help you get started, weā€™ve selected a few meta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github luisgerhorst / ccms / etc / admin / views.js View on Github external
views['post.html'] = function (callback, path) {

		var postID = path.replace(/^\/post\//, '');

		database.view('posts', 'byPostID?key="' + postID + '"', function (response, error) {

			if (error) console.log('Error.', error);

			callback(response.rows[0].value);

		});

	};

	views['meta.html'] = function (callback) {

		database.read('meta', function (response, error) {
			if (error) console.log('Error while getting view "' + func + '" of design document "posts".', error);
			callback(response);
		});

	};

	return views;

};
github luisgerhorst / ccms / etc / admin / start.js View on Github external
message: 'The error <code>' + error.code + ' ' + error.message + '</code> occured while loading the post.'
					});
					else if (!response.rows.length) callback(null, {
						title: 'Not Found',
						heading: 'Post not found',
						message: "The post you were looking for wasn't found."
					});
					else callback(response.rows[0].value);
		
				});
		
			}
			
		};
	
		views['meta.html'] = {
			
			load: function (callback) {
		
				database.read('meta', function (response, error) {
					
					if (error) callback(null, {
						title: error.message,
						heading: 'HTTP Error',
						message: 'The error <code>' + error.code + ' ' + error.message + '</code> occured while loading meta.'
					});
					
					else callback(response);
					
				});
		
			}

meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis