From 2343dbec6580ff007320017127fb44997c5d9f7d Mon Sep 17 00:00:00 2001 From: RubyNguyen07 Date: Sun, 4 Feb 2024 21:55:59 +0800 Subject: [PATCH 1/2] Set up initial schema --- package-lock.json | 76 +++++- package.json | 4 +- .../20240204133642_init/migration.sql | 235 ++++++++++++++++++ prisma/migrations/migration_lock.toml | 3 + prisma/schema.prisma | 203 +++++++++++++++ 5 files changed, 519 insertions(+), 2 deletions(-) create mode 100644 prisma/migrations/20240204133642_init/migration.sql create mode 100644 prisma/migrations/migration_lock.toml create mode 100644 prisma/schema.prisma diff --git a/package-lock.json b/package-lock.json index 414267d..af93c00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,72 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@prisma/client": "^5.9.1", "axios": "^1.6.2", "cors": "^2.8.5", "dotenv": "^16.3.1", "express": "^4.18.2", "express-promise-router": "^4.1.1", "nodemon": "^3.0.2", - "pg": "^8.11.3" + "pg": "^8.11.3", + "prisma": "^5.9.1" + } + }, + "node_modules/@prisma/client": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.9.1.tgz", + "integrity": "sha512-caSOnG4kxcSkhqC/2ShV7rEoWwd3XrftokxJqOCMVvia4NYV/TPtJlS9C2os3Igxw/Qyxumj9GBQzcStzECvtQ==", + "hasInstallScript": true, + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/debug": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.9.1.tgz", + "integrity": "sha512-yAHFSFCg8KVoL0oRUno3m60GAjsUKYUDkQ+9BA2X2JfVR3kRVSJFc/GpQ2fSORi4pSHZR9orfM4UC9OVXIFFTA==" + }, + "node_modules/@prisma/engines": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.9.1.tgz", + "integrity": "sha512-gkdXmjxQ5jktxWNdDA5aZZ6R8rH74JkoKq6LD5mACSvxd2vbqWeWIOV0Py5wFC8vofOYShbt6XUeCIUmrOzOnQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/debug": "5.9.1", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/fetch-engine": "5.9.1", + "@prisma/get-platform": "5.9.1" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64.tgz", + "integrity": "sha512-HFl7275yF0FWbdcNvcSRbbu9JCBSLMcurYwvWc8WGDnpu7APxQo2ONtZrUggU3WxLxUJ2uBX+0GOFIcJeVeOOQ==" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.9.1.tgz", + "integrity": "sha512-l0goQOMcNVOJs1kAcwqpKq3ylvkD9F04Ioe1oJoCqmz05mw22bNAKKGWuDd3zTUoUZr97va0c/UfLNru+PDmNA==", + "dependencies": { + "@prisma/debug": "5.9.1", + "@prisma/engines-version": "5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64", + "@prisma/get-platform": "5.9.1" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.9.1.tgz", + "integrity": "sha512-6OQsNxTyhvG+T2Ksr8FPFpuPeL4r9u0JF0OZHUBI/Uy9SS43sPyAIutt4ZEAyqWQt104ERh70EZedkHZKsnNbg==", + "dependencies": { + "@prisma/debug": "5.9.1" } }, "node_modules/abbrev": { @@ -991,6 +1050,21 @@ "node": ">=0.10.0" } }, + "node_modules/prisma": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.9.1.tgz", + "integrity": "sha512-Hy/8KJZz0ELtkw4FnG9MS9rNWlXcJhf98Z2QMqi0QiVMoS8PzsBkpla0/Y5hTlob8F3HeECYphBjqmBxrluUrQ==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "5.9.1" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", diff --git a/package.json b/package.json index 8a4ae0a..add6be1 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,14 @@ "author": "", "license": "ISC", "dependencies": { + "@prisma/client": "^5.9.1", "axios": "^1.6.2", "cors": "^2.8.5", "dotenv": "^16.3.1", "express": "^4.18.2", "express-promise-router": "^4.1.1", "nodemon": "^3.0.2", - "pg": "^8.11.3" + "pg": "^8.11.3", + "prisma": "^5.9.1" } } diff --git a/prisma/migrations/20240204133642_init/migration.sql b/prisma/migrations/20240204133642_init/migration.sql new file mode 100644 index 0000000..e9304b7 --- /dev/null +++ b/prisma/migrations/20240204133642_init/migration.sql @@ -0,0 +1,235 @@ +-- CreateEnum +CREATE TYPE "Day" AS ENUM ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY'); + +-- CreateEnum +CREATE TYPE "Semester" AS ENUM ('SEMESTER_1', 'SEMESTER_2', 'SPECIAL_TERM_1', 'SPECIAL_TERM_2'); + +-- CreateEnum +CREATE TYPE "LessonType" AS ENUM ('LECTURE', 'TUTORIAL', 'LABORATORY', 'SEMINAR'); + +-- CreateEnum +CREATE TYPE "CourseType" AS ENUM ('COMPUTER_SCIENCE', 'BUSINESS_ANALYTICS', 'INFORMATION_SYSTEMS', 'INFORMATION_SECURITY', 'COMPUTER_ENGINEERING'); + +-- CreateTable +CREATE TABLE "CompletionRequirement" ( + "id" TEXT NOT NULL, + "courseId" TEXT NOT NULL, + "cumulativeCreditRequirements" INTEGER NOT NULL, + + CONSTRAINT "CompletionRequirement_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "CoreRequirement" ( + "id" TEXT NOT NULL, + "doubleCountingModules" INTEGER NOT NULL, + + CONSTRAINT "CoreRequirement_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ElectiveRequirement" ( + "id" TEXT NOT NULL, + + CONSTRAINT "ElectiveRequirement_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "UniversityLevelRequirement" ( + "id" TEXT NOT NULL, + + CONSTRAINT "UniversityLevelRequirement_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL, + "userEmail" VARCHAR(255) NOT NULL, + "userName" VARCHAR(255) NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "courseId" TEXT, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Course" ( + "id" TEXT NOT NULL, + "courseType" "CourseType" NOT NULL, + "creditsRequirement" INTEGER NOT NULL, + + CONSTRAINT "Course_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Module" ( + "id" TEXT NOT NULL, + "academicYear" TEXT NOT NULL, + "code" TEXT NOT NULL, + "name" TEXT NOT NULL, + "description" TEXT, + "credit" INTEGER NOT NULL, + "faculty" TEXT NOT NULL, + "department" TEXT NOT NULL, + "canSU" BOOLEAN NOT NULL, + "aliases" TEXT[], + "semesterOffered" "Semester"[], + "prerequisiteTree" JSONB, + "coreId" TEXT NOT NULL, + "electiveId" TEXT NOT NULL, + "universityLevelRequirementId" TEXT NOT NULL, + + CONSTRAINT "Module_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Prerequisite" ( + "id" TEXT NOT NULL, + "currentModId" TEXT NOT NULL, + "prereqModId" TEXT NOT NULL, + + CONSTRAINT "Prerequisite_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Corequisite" ( + "id" TEXT NOT NULL, + "currentModId" TEXT NOT NULL, + "coreqModId" TEXT NOT NULL, + + CONSTRAINT "Corequisite_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Preclusion" ( + "id" TEXT NOT NULL, + "currentModuleId" TEXT NOT NULL, + "precludeModuleId" TEXT NOT NULL, + + CONSTRAINT "Preclusion_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "RawLesson" ( + "id" TEXT NOT NULL, + "moduleId" TEXT NOT NULL, + "semester" INTEGER NOT NULL, + "classNo" TEXT NOT NULL, + "day" "Day" NOT NULL, + "startTime" TEXT NOT NULL, + "endTime" TEXT NOT NULL, + "lessonType" "LessonType" NOT NULL, + "venue" TEXT NOT NULL, + "weeks" INTEGER[], + "size" INTEGER +); + +-- CreateTable +CREATE TABLE "SemesterData" ( + "moduleId" TEXT NOT NULL, + "semester" "Semester" NOT NULL, + "examDate" TIMESTAMP(3), + "examDuration" INTEGER, + + CONSTRAINT "SemesterData_pkey" PRIMARY KEY ("moduleId","semester") +); + +-- CreateTable +CREATE TABLE "Exemption" ( + "id" TEXT NOT NULL, + "exemptionName" TEXT NOT NULL, + + CONSTRAINT "Exemption_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ModuleExemption" ( + "exemptionId" TEXT NOT NULL, + "moduleId" TEXT NOT NULL, + + CONSTRAINT "ModuleExemption_pkey" PRIMARY KEY ("exemptionId") +); + +-- CreateTable +CREATE TABLE "MCExemption" ( + "exemptionId" TEXT NOT NULL, + "exemptionNumber" INTEGER NOT NULL, + + CONSTRAINT "MCExemption_pkey" PRIMARY KEY ("exemptionId") +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_userEmail_key" ON "User"("userEmail"); + +-- CreateIndex +CREATE UNIQUE INDEX "Module_code_key" ON "Module"("code"); + +-- CreateIndex +CREATE UNIQUE INDEX "Prerequisite_currentModId_prereqModId_key" ON "Prerequisite"("currentModId", "prereqModId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Corequisite_currentModId_coreqModId_key" ON "Corequisite"("currentModId", "coreqModId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Preclusion_currentModuleId_precludeModuleId_key" ON "Preclusion"("currentModuleId", "precludeModuleId"); + +-- CreateIndex +CREATE UNIQUE INDEX "RawLesson_moduleId_classNo_semester_key" ON "RawLesson"("moduleId", "classNo", "semester"); + +-- AddForeignKey +ALTER TABLE "CompletionRequirement" ADD CONSTRAINT "CompletionRequirement_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "CoreRequirement" ADD CONSTRAINT "CoreRequirement_id_fkey" FOREIGN KEY ("id") REFERENCES "CompletionRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ElectiveRequirement" ADD CONSTRAINT "ElectiveRequirement_id_fkey" FOREIGN KEY ("id") REFERENCES "CompletionRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "UniversityLevelRequirement" ADD CONSTRAINT "UniversityLevelRequirement_id_fkey" FOREIGN KEY ("id") REFERENCES "CompletionRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "User" ADD CONSTRAINT "User_courseId_fkey" FOREIGN KEY ("courseId") REFERENCES "Course"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Module" ADD CONSTRAINT "Module_coreId_fkey" FOREIGN KEY ("coreId") REFERENCES "CoreRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Module" ADD CONSTRAINT "Module_electiveId_fkey" FOREIGN KEY ("electiveId") REFERENCES "ElectiveRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Module" ADD CONSTRAINT "Module_universityLevelRequirementId_fkey" FOREIGN KEY ("universityLevelRequirementId") REFERENCES "UniversityLevelRequirement"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Prerequisite" ADD CONSTRAINT "Prerequisite_currentModId_fkey" FOREIGN KEY ("currentModId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Prerequisite" ADD CONSTRAINT "Prerequisite_prereqModId_fkey" FOREIGN KEY ("prereqModId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Corequisite" ADD CONSTRAINT "Corequisite_currentModId_fkey" FOREIGN KEY ("currentModId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Corequisite" ADD CONSTRAINT "Corequisite_coreqModId_fkey" FOREIGN KEY ("coreqModId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Preclusion" ADD CONSTRAINT "Preclusion_currentModuleId_fkey" FOREIGN KEY ("currentModuleId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Preclusion" ADD CONSTRAINT "Preclusion_precludeModuleId_fkey" FOREIGN KEY ("precludeModuleId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "RawLesson" ADD CONSTRAINT "RawLesson_moduleId_fkey" FOREIGN KEY ("moduleId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "SemesterData" ADD CONSTRAINT "SemesterData_moduleId_fkey" FOREIGN KEY ("moduleId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ModuleExemption" ADD CONSTRAINT "ModuleExemption_exemptionId_fkey" FOREIGN KEY ("exemptionId") REFERENCES "Exemption"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ModuleExemption" ADD CONSTRAINT "ModuleExemption_moduleId_fkey" FOREIGN KEY ("moduleId") REFERENCES "Module"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "MCExemption" ADD CONSTRAINT "MCExemption_exemptionId_fkey" FOREIGN KEY ("exemptionId") REFERENCES "Exemption"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..fbffa92 --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..2904133 --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,203 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +enum Day { + MONDAY + TUESDAY + WEDNESDAY + THURSDAY + FRIDAY + SATURDAY + SUNDAY +} + +enum Semester { + SEMESTER_1 + SEMESTER_2 + SPECIAL_TERM_1 + SPECIAL_TERM_2 +} + +enum LessonType { + LECTURE + TUTORIAL + LABORATORY + SEMINAR +} + +enum CourseType { + COMPUTER_SCIENCE + BUSINESS_ANALYTICS + INFORMATION_SYSTEMS + INFORMATION_SECURITY + COMPUTER_ENGINEERING +} + +model CompletionRequirement { + id String @id @default(uuid()) + course Course @relation(fields: [courseId], references: [id]) + courseId String + cumulativeCreditRequirements Int + + coreRequirements CoreRequirement[] + electiveRequirements ElectiveRequirement[] + universityLevelRequirement UniversityLevelRequirement[] +} + +model CoreRequirement { + completionRequirement CompletionRequirement @relation(fields: [id], references: [id]) + id String @id + doubleCountingModules Int + + modules Module[] +} + +model ElectiveRequirement { + completionRequirement CompletionRequirement @relation(fields: [id], references: [id]) + id String @id + + modules Module[] + +} + +model UniversityLevelRequirement { + completionRequirement CompletionRequirement @relation(fields: [id], references: [id]) + id String @id + + modules Module[] +} + +model User { + id String @id @default(uuid()) + userEmail String @db.VarChar(255) @unique + userName String @db.VarChar(255) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + course Course? @relation(fields: [courseId], references: [id]) + courseId String? +} + +model Course { + id String @id @default(uuid()) + courseType CourseType + creditsRequirement Int + + users User[] + completionRequirements CompletionRequirement[] +} + +model Module { + id String @id @default(uuid()) + academicYear String // 2023-2024 + code String @unique + name String + description String? + credit Int + faculty String + department String + canSU Boolean + aliases String[] // Store aliase module ids + semesterOffered Semester[] + prerequisiteTree Json? + coreRequirement CoreRequirement @relation(fields: [coreId], references: [id]) + coreId String + electiveRequirement ElectiveRequirement @relation(fields: [electiveId], references: [id]) + electiveId String + universityLevelRequirement UniversityLevelRequirement @relation(fields: [universityLevelRequirementId], references: [id]) + universityLevelRequirementId String + + + currentMods Prerequisite[] @relation(name: "Current Mod Prereq") + prereqMods Prerequisite[] @relation(name: "Prereq Mod") + currentModsCoreq Corequisite[] @relation(name: "Current Mod Coreq") + coreqMods Corequisite[] @relation(name: "Coreq Mod") + currentModPrecludes Preclusion[] @relation(name: "Current Mod Preclude") + precludeMods Preclusion[] @relation(name: "Preclude Mod") + rawLessons RawLesson[] + semesterData SemesterData[] + exemptedModules ModuleExemption[] +} + +model Prerequisite { + id String @id @default(uuid()) + currentMod Module @relation(name: "Current Mod Prereq", fields: [currentModId], references: [id]) + currentModId String + prereqMod Module @relation(name: "Prereq Mod", fields: [prereqModId], references: [id]) + prereqModId String + @@unique([currentModId, prereqModId]) +} + +model Corequisite { + id String @id @default(uuid()) + currentMod Module @relation(name: "Current Mod Coreq", fields: [currentModId], references: [id]) + currentModId String + coreqMod Module @relation(name: "Coreq Mod", fields: [coreqModId], references: [id]) + coreqModId String + @@unique([currentModId, coreqModId]) +} + + +model Preclusion { + id String @id @default(uuid()) + currentModule Module @relation(name: "Current Mod Preclude", fields: [currentModuleId], references: [id]) + currentModuleId String + precludeModule Module @relation(name: "Preclude Mod", fields: [precludeModuleId], references: [id]) + precludeModuleId String + @@unique([currentModuleId, precludeModuleId]) +} + +model RawLesson { + id String @default(uuid()) + module Module @relation(fields: [moduleId], references: [id]) + moduleId String + semester Int + classNo String + day Day + startTime String // 0900 + endTime String // 1100 + lessonType LessonType + venue String + weeks Int[] + size Int? + @@unique([moduleId, classNo, semester]) +} + +model SemesterData { + module Module @relation(fields: [moduleId], references: [id]) + moduleId String + semester Semester + examDate DateTime? + examDuration Int? // minutes + + @@id([moduleId, semester]) +} + +model Exemption { + id String @id @default(uuid()) + exemptionName String + moduleExemptions ModuleExemption[] + mceExemptions MCExemption[] +} + +model ModuleExemption { + exemption Exemption @relation(fields: [exemptionId], references: [id]) + exemptionId String @id + exemptedModule Module @relation(fields: [moduleId], references: [id]) + moduleId String +} + +model MCExemption { + exemption Exemption @relation(fields: [exemptionId], references: [id]) + exemptionId String @id + exemptionNumber Int +} + From f35c2c646b4c3d958dd299d989774893bd8ef783 Mon Sep 17 00:00:00 2001 From: Joy Ng Jing Ru Date: Sun, 31 Mar 2024 15:01:17 +0800 Subject: [PATCH 2/2] Create end point for events retrieval --- routes/events.js | 12 ++++++++++++ routes/index.js | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 routes/events.js diff --git a/routes/events.js b/routes/events.js new file mode 100644 index 0000000..690ae00 --- /dev/null +++ b/routes/events.js @@ -0,0 +1,12 @@ +import Router from "express-promise-router"; +import { query } from "../db/index.js"; + +const router = new Router(); + +router.get("/", async (req, res) => { + const { rows } = await query("SELECT * FROM events;"); + + res.send(rows); +}); + +export default router; \ No newline at end of file diff --git a/routes/index.js b/routes/index.js index 4d61291..b019752 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,8 +1,10 @@ // imports import connection from "./connection.js" +import events from "./events.js" const mountRoutes = (app) => { app.use("/connection", connection) // example route + app.use("/events", events) } export default mountRoutes; \ No newline at end of file