UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

23 lines (16 loc) 546 B
// tslint:disable:no-console import * as mongoose from 'mongoose'; import { chevre } from '../../../lib/index'; const project = { id: String(process.env.PROJECT_ID) }; async function main() { await mongoose.connect(<string>process.env.MONGOLAB_URI); const eventRepo = await chevre.repository.Event.createInstance(mongoose.connection); const result = await eventRepo.cancelEvent({ project: { id: project.id }, id: '7iri6w0m1h1hu5y' }); console.log(result); } main() .then() .catch(console.error);