first commit

This commit is contained in:
dlinux-host
2024-10-03 12:22:56 -04:00
commit 7f20ec0336
6 changed files with 362 additions and 0 deletions

15
models/Url.js Normal file
View File

@ -0,0 +1,15 @@
const mongoose = require('mongoose');
const urlSchema = new mongoose.Schema({
longUrl: {
type: String,
required: true,
},
shortId: {
type: String,
required: true,
unique: true,
},
});
module.exports = mongoose.model('Url', urlSchema);