
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
dropin-tileservice
Advanced tools
A drop in vector tile service using pg for turning any postres backend into a tileserver.
npm run build at the rootnpm install path/to/reponpm link path/to/repoimport { Tileserver } from "dropin-tileservice"
import { Pool } from "pg"
import Express from "express"
const app = Express()
const port = 5000
app.use(cors())
const connection_params = {
user: "postgres",
host: "localhost",
database: "features",
password: "secret-password", //optional
port: 5432
}
const pool = new Pool(connection_params)
const tileService = new Tileserver()
//SQL to be run against the pool db
tileservice.setQuery("SELECT id, geom FROM schema.table WHERE prop = 44")
tileservice.setSrid(2252) //Michigan Central
app.get("/tiles/:z/:x/:y", async (req, res) => {
try {
const conn = await pool.connect()
const tiles = await ts.query(req.params.z, req.params.x, req.params.y, conn, {
layername: "default"
})
res.status(200).send(tiles) //protobuf sent as result
} catch (e) {
console.log(e)
} finally {
await conn.release()
}
})
tileservice.setQuery("SELECT id, geom FROM schema.table WHERE prop = $1")
tileservice.setSrid(2252) //Michigan Central
app.get("/tiles/:z/:x/:y", async (req, res) => {
try {
const conn = await pool.connect()
const tiles = await ts.query(req.params.z, req.params.x, req.params.y, conn, {
params: [44],
layername: "default"
})
res.status(200).send(tiles) //protobuf sent as result
} catch (e) {
console.log(e)
} finally {
await conn.release()
}
})
app.get("/tiles/:z/:x/:y", async (req, res) => {
try {
const conn = await pool.connect()
const tiles = await ts.query(req.params.z, req.params.x, req.params.y, conn, {
queryString: "SELECT id, geom FROM schema.table WHERE prop = $1",
srid: 2252,
params: [44],
layername: "default"
})
res.status(200).send(tiles) //protobuf sent as result
} catch (e) {
console.log(e)
} finally {
await conn.release()
}
})
FAQs
A minimal drop in vector tile service using pg
We found that dropin-tileservice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.