Saving Projections when using InMemDB

So I have some projections that I’d like to stay persistent between runs using --InMemDB during development. Rebuilding the projections’ results is fine but having to recreate or copy/paste the projection code is getting tedious. Am I missing something basic in the config to allow for this?


No you aren’t missing anything - projection definitions are simply events in the database so are also subject to in-memory storage.

Your best bet is to use a wrapper script which recreates the projections on startup.


Is there any documentation on this. Have been using Node.js for this project (built on top of ges-client) and there is no support for projections built in. I was doing a straight http requests for the projection results, are there related HTTP verbs to do CRUD related operations on projections?

There is no documentation on this yet.
The API is described in this controller.

For example, if you want to create a continuous projection here is the http request to do so.

curl -i -d @projection.json -H "content-type:application/json" "http://localhost:2113/projections/continuous?name=sample_projection&emit=no&checkpoints=yes&enabled=yes" -u admin:changeit

and the projection.json will contain the body of the projection you want to create




return {





s.count += 1;

return s;



Sweet! Thanks for this, should be enough to get me started!

Just an update if anyone stumbles upon this later.

        name: path.basename(file,`.js`),
        emit: `no`,
        checkpoints: `yes`,
        enabled: `yes`
    .auth('admin', 'changeit')
    .set('Accept', 'application/json')
    .end(function (error, response) {
        if(error) {
            const {body} = response;
            const {name} = body;

Using superagent here is what a working request looks like in node. Note the data is the javascript file (not json) being uploaded. Thanks Pieter for the help getting started!