-
-
Save ayende/502133e9abcbe5efc21c8daa60cece6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readline = require('readline'); | |
const Raven = require('ravendb'); | |
const process = require('process'); | |
const store = Raven.DocumentStore.create({ | |
// ... initialize RavenDB client ... | |
}).initialize(); | |
const session = store.openSession(); | |
const doc = JSON.parse(readline.readline()); | |
session.store(doc); | |
session.saveChanges() | |
.catch(error => { | |
console.error(error); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment