convex
Version:
Client for the Convex Cloud
57 lines (48 loc) • 1.69 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var readme_exports = {};
__export(readme_exports, {
readmeCodegen: () => readmeCodegen
});
module.exports = __toCommonJS(readme_exports);
function readmeCodegen() {
return `# Welcome to your Convex functions directory!
Write your Convex functions here.
A query function looks like:
\`\`\`typescript
// myQueryFunction.ts
import { query } from "./_generated/server";
export default query(async ({ db }) => {
// Load data with \`db\` here!
});
\`\`\`
A mutation function looks like:
\`\`\`typescript
// myMutationFunction.ts
import { mutation } from "./_generated/server";
export default mutation(async ({ db }) => {
// Edit data with \`db\` here!
});
\`\`\`
The Convex CLI is your friend. See everything it can do by running
\`npx convex -h\` in your project root directory. To learn more, launch the docs
with \`npx convex docs\`.
`;
}
//# sourceMappingURL=readme.js.map