From 85f217f63e248ae0df44368a6a0d03620955f170 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Wed, 18 Oct 2023 03:48:52 -0400 Subject: Created initial backend architecture and redirection routes --- db/url-schema.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/url-schema.js (limited to 'db') diff --git a/db/url-schema.js b/db/url-schema.js new file mode 100644 index 0000000..8392e3d --- /dev/null +++ b/db/url-schema.js @@ -0,0 +1,14 @@ +const mongoose = require('mongoose'); + +const UrlSchema = new mongoose.Schema({ + slug: { + type: mongoose.SchemaTypes.String, + required: true + }, + url: { + type: mongoose.SchemaTypes.String, + required: true + } +}); + +module.exports = mongoose.model('Url', UrlSchema); -- cgit v1.2.3