Hitchy has moved its repositories incl. this one.
connecting Hitchy's ODM with etcd cluster
MIT
Hitchy is a server-side framework for developing web applications with Node.js. Odem is a plugin for Hitchy implementing an object document management (ODM) using data backends like regular file systems, LevelDBs and temporary in-memory databases.
This plugin is implementing another such data backend enabling data of Hitchy's ODM to be stored in an etcd-based cluster.
Execute the following command in folder of your Hitchy-based application:
npm i hitchy-plugin-odem-etcd
It is installing this plugin and its dependency hitchy-plugin-odem. So, you may rely only on this plugin instead of listing hitchy-plugin-odem as a dependency yourself, as well.
Select an instance of this backend as default adapter in your application's configuration by creating a file config/database.js with content similar to this:
const File = require( "fs" );
module.exports = function() {
return {
database: {
default : new this.runtime.services.OdemAdapterEtcd( {
hosts: [
"https://10.0.1.1:2379",
"https://10.0.1.2:2379",
"https://10.0.1.3:2379",
],
credentials: {
rootCertificate: File.readFileSync( "path/to/ca.pem" ),
certChain: File.readFileSync( "path/to/cert.pem" ),
privateKey: File.readFileSync( "path/to/key.pem" ),
}
} ),
},
};
};
Provided options are basically forwarded to instance of Etcd3 created internally.