I’m close yet so far away. I’m getting a response status code of 201 with the following code, but I’m seeing some kruft when I open the project in EventStore.
Please advise.
request({
method: 'POST',
qs: {
name: projection.name,
emit: 'yes',
checkpoints: 'yes',
enabled: 'yes'
},
uri: 'http://admin:[email protected]:2113/projections/continuous',
multipart: [{body: projection.source}],
}, (error, response, body) => {
if (error) {
return console.error('upload failed:', error);
}
console.log('Upload successful! Server responded with:', JSON.stringify(response, null, 2));
});
}