Skip to content

Instantly share code, notes, and snippets.

const { PrismaClient } = require('@prisma/client');
const { writeFileSync } = require('fs');
async function generatePrismaModels() {
// Connect to the database using the Prisma client
const prisma = new PrismaClient({
datasources: {
db: {
url: 'sqlserver://localhost:1433;database=mydb;user=sa;password=mypswd;trustServerCertificate=true',
},

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

// =========================
// -=-=-=-=-=-=-= DEVOIR A RENDRE LE 16/01/2024 AVANT 23h59 min -=-=-=-=-=-=-=-=-=-=-
// =========================
// NB: Pour tous les exercices, prière des les placer dans un fichier (.js) séparé puis l 'importer dans le fichier (.html)
// EXERCICE 1 - LES BOUCLES (5 points)
/**