Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
jsonapi-store-elasticsearch
Advanced tools
jsonapi-server-elasticsearch
is a Elasticsearch backed data store for jsonapi-server
.
This project conforms to the specification laid out in the jsonapi-server handler documentation.
var ElasticsearchStore = require("jsonapi-store-elasticsearch");
jsonApi.define({
resource: "comments",
handlers: new ElasticsearchStore({
host: "localhost:9200"
})
});
Getting this data store to production isn't too bad...
You'll probably want to override this handler's search
functionality in order to achieve high-performance queries. That may look something like this:
var efficientHandler = new ElasticsearchStore({
host: "localhost:9200"
});
// the next function correlates with the jsonapi-server handler documentation:
// https://github.com/holidayextras/jsonapi-server/blob/master/documentation/handlers.md
efficientHandler.search = function(request, callback) {
// within this scope, this._db is the Elasticsearch client
var efficientQuery = buildAwesomeQuery();
this._db.search(efficientQuery, callback);
};
jsonApi.define({
resource: "comments",
handlers: efficientHandler
});
When making schema changes...
If you are only adding new attributes, you can push in a mapping for the new attribute, deploy your code changes and celebrate.
If you are making destructive changes, you'll need to create a new index, add a fresh mapping, migrate data into it and finally swap the "jsonapi" alias to point to your new index. You can read this section on how to switch aliases around: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html#indices-aliases
FAQs
Elasticsearch data store for jsonapi-server.
The npm package jsonapi-store-elasticsearch receives a total of 1 weekly downloads. As such, jsonapi-store-elasticsearch popularity was classified as not popular.
We found that jsonapi-store-elasticsearch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.