
Security News
VulnCon 2025: NVD Scraps Industry Consortium Plan, Raising Questions About Reform
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
@vercel/cosmosdb-server
Advanced tools
A Cosmos DB server implementation for testing your apps locally.
const { default: cosmosServer } = require("@vercel/cosmosdb-server");
const { CosmosClient } = require("@azure/cosmos");
const https = require("https");
cosmosServer().listen(3000, () => {
console.log(`Cosmos DB server running at https://localhost:3000`);
runClient().catch(console.error);
});
async function runClient() {
const client = new CosmosClient({
endpoint: `https://localhost:3000`,
key: "dummy key",
// disable SSL verification
// since the server uses self-signed certificate
agent: https.Agent({ rejectUnauthorized: false })
});
// initialize databases since the server is always empty when it boots
const { database } = await client.databases.createIfNotExists({ id: 'test-db' });
const { container } = await database.containers.createIfNotExists({ id: 'test-container' });
// use the client
// ...
}
To choose between listening for HTTP and HTTPS, import the right function.
const { createHttpServer, createHttpsServer } = require("@vercel/cosmosdb-server");
To run the server on cli:
cosmosdb-server -p 3000
or without SSL:
cosmosdb-server -p 3000 --no-ssl
npm install @vercel/cosmosdb-server
It exposes the cosmosdb-server
cli command as well.
Create a new instance of cosmos server. You can pass https server options as the argument.
See https.createServer
for more information.
ST_ISVALID
and ST_ISVALIDDETAILED
. Other spatial functions are supported; however, the ST_DISTANCE
function uses centroid distances and results may differ from Cosmos DB values.It may not support newly added features yet. Please report on the Github issue if you find one.
To build the project, use yarn build
.
To run the server from development code, after building, use node lib/cli.js
.
FAQs
A Cosmos DB server implementation
The npm package @vercel/cosmosdb-server receives a total of 244,467 weekly downloads. As such, @vercel/cosmosdb-server popularity was classified as popular.
We found that @vercel/cosmosdb-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.