Skip to content

Instantly share code, notes, and snippets.

@icebob
Last active March 28, 2018 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icebob/434dd6e7d260f74811cb78fc1e852428 to your computer and use it in GitHub Desktop.
Save icebob/434dd6e7d260f74811cb78fc1e852428 to your computer and use it in GitHub Desktop.
Product service file with mongodb adapter
"use strict";
const DbService = require("moleculer-db");
const MongoAdapter = require("moleculer-db-adapter-mongo");
module.exports = {
name: "products",
mixins: [DbService],
adapter: new MongoAdapter("mongodb://localhost/my-first-service"),
collection: "products"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment