
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
fastify-autocrud
Advanced tools
Plugin for autogenerate CRUD routes as fast as possible.
npm i fastify-autocrud --save
fastify.register(require('fastify-autocrud'), {
prefix: '/api/products',
Collection: require('../models/Product')
})
Product.js
const mongoose = require('mongoose')
const Product = new mongoose.Schema({
name: String,
description: String,
image: String,
cost: Number,
price: Number,
qty: Number
}, {
timestamps: true
})
module.exports = mongoose.model('Product', Product)
If you want add custom routes
const customController = require('customController')
fastify.register(require('fastify-autocrud'), {
prefix: '/api/products',
Collection: require('../models/Product'),
additionalRoute: customController
})
customController.js
const boom = require('boom')
const customRoute = {
method: 'GET',
url: '/custom',
handler: async function (req, reply) {
try {
reply.type('application/json').code(200).send({ "customroute": "ok" })
} catch (err) {
throw boom.boomify(err)
}
}
}
module.exports = [customRoute]
Licensed under MIT.
FAQs
Plugin for autogenerate CRUD route as fast as possible.
The npm package fastify-autocrud receives a total of 4 weekly downloads. As such, fastify-autocrud popularity was classified as not popular.
We found that fastify-autocrud 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.