define the Post model as required by the client application

PHOTO EMBED

Wed Jun 21 2023 12:37:51 GMT+0000 (Coordinated Universal Time)

Saved by @AndraAbly #javascript

// define the Post model as required by the client application
interface Post {
	id: number,
	title: string,
	comments: Array<string>,
}

// create a live, observable data model for post 123
let model = new models.Model<Post>({
    	name: 'posts',
    	sync: getPost(123),
streams: [postEvents, commentEvents],
});
content_copyCOPY