Jess182
Jess182
DDeno
Created by Jess182 on 2/13/2024 in #help
Deno compiled bin not create file
Hi, I have a script that create file with Deno.writeFileSync() on current location When run script with deno, the file is created I compiled script with all permissions to target macOS ARM When I run bin, image isn't saved & no errors Do you know what its happen?
2 replies
DDeno
Created by Jess182 on 5/10/2023 in #help
Clear cache modules
Hello guys, I would like to know how can I remove unnecessary modules from cache? I've run - deno cache --reload=npm: main.ts
- deno cache --reload main.ts
And after that I´m keep seeing in cache folder npm modules that I don't import/use anymore on my script (I don't use deno.lock on my project)
1 replies
DDeno
Created by Jess182 on 11/17/2022 in #help
Problem with Mongoose + auth
Hi i followed the mongoose example provided by denoland, but if my local database has authentication, mongoose not connect (it freeze on connect statemment) example: https://github.com/denoland/examples/tree/main/with-mongoose
import mongoose, { model, Schema } from 'npm:mongoose@^6.7';

const dinosaurSchema = new Schema({
name: { type: String, unique: true },
description: String,
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now },
});

const Dinosaur = model('Dinosaur', dinosaurSchema);

// await mongoose.connect('mongodb://localhost:27017');

await mongoose.connect('mongodb://username:password@localhost:27017');

// Check to see connection status.
console.log(mongoose.connection.readyState);

console.log(await Dinosaur.find());
import mongoose, { model, Schema } from 'npm:mongoose@^6.7';

const dinosaurSchema = new Schema({
name: { type: String, unique: true },
description: String,
createdAt: { type: Date, default: Date.now },
updatedAt: { type: Date, default: Date.now },
});

const Dinosaur = model('Dinosaur', dinosaurSchema);

// await mongoose.connect('mongodb://localhost:27017');

await mongoose.connect('mongodb://username:password@localhost:27017');

// Check to see connection status.
console.log(mongoose.connection.readyState);

console.log(await Dinosaur.find());
Note: same URI works with node + mongoose
8 replies