
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Sebuah library sederhana untuk menggunakan Google Sheets sebagai database untuk operasi CRUD (Create, Read, Update, Delete).
Sebuah library sederhana untuk menggunakan Google Sheets sebagai database untuk operasi CRUD (Create, Read, Update, Delete) di proyek Node.js.
getAll, findBy, create, updateBy, dan deleteBy.google-spreadsheet yang populer.npm install google-sheet-simple-db
Pertama, pastikan Anda sudah memiliki kredensial Service Account dari Google Cloud Console dalam bentuk file JSON.
Contoh Penggunaan di Server Express.js:
const express = require('express');
const GoogleSheetDB = require('google-sheet-simple-db'); // Impor library Anda
const creds = require('./path/to/your/credentials.json'); // Impor kredensial Anda
const app = express();
app.use(express.json());
// Inisialisasi Database
const db = new GoogleSheetDB({
spreadsheetId: 'ID_SPREADSHEET_ANDA',
credentials: creds,
sheetName: 'maba2025' // Opsional, defaultnya 'maba2025'
});
// Route untuk mengambil semua data
app.get('/maba', async (req, res) => {
try {
const data = await db.getAll();
res.json({ success: true, data });
} catch (error) {
res.status(500).json({ success: false, message: error.message });
}
});
// Route untuk membuat data baru
app.post('/maba', async (req, res) => {
try {
const newData = await db.create(req.body);
res.status(201).json({ success: true, data: newData });
} catch (error) {
res.status(400).json({ success: false, message: error.message });
}
});
// Route untuk mencari berdasarkan NPM
app.get('/maba/:npm', async (req, res) => {
try {
const { npm } = req.params;
const data = await db.findBy('npm', npm);
if (!data) {
return res.status(404).json({ success: false, message: 'Data tidak ditemukan' });
}
res.json({ success: true, data });
} catch (error) {
res.status(500).json({ success: false, message: error.message });
}
});
const PORT = 3001;
app.listen(PORT, () => {
console.log(`Server berjalan di http://localhost:${PORT}`);
});
FAQs
Sebuah library sederhana untuk menggunakan Google Sheets sebagai database untuk operasi CRUD (Create, Read, Update, Delete).
The npm package dataxcel receives a total of 1 weekly downloads. As such, dataxcel popularity was classified as not popular.
We found that dataxcel demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.