diff --git a/apps/backend/.env.example b/apps/backend/.env.example
index fe12ec82..7a4c6e88 100644
--- a/apps/backend/.env.example
+++ b/apps/backend/.env.example
@@ -1,6 +1,9 @@
PUBLIC_SUPABASE_ANON_KEY=
PUBLIC_SUPABASE_URL=
+# https://cdn.example.com
+CLOUDFLARE_BUCKET_DOMAIN=
+
CLOUDFLARE_TOKEN_VALUE=
CLOUDFLARE_ACCESS_KEY=
CLOUDFLARE_SECRET_ACCESS_KEY=
diff --git a/apps/backend/server.js b/apps/backend/server.js
index 90670aff..90886b4b 100644
--- a/apps/backend/server.js
+++ b/apps/backend/server.js
@@ -42,3 +42,7 @@ app.get('/', (req, res) => {
app.listen(port, () => {
console.log(`ClassroomIO Backend listening on port ${port}!`);
});
+
+process.on('uncaughtException', (err) => {
+ console.error('Uncaught error, err');
+});
diff --git a/apps/backend/src/routes/uploadVideo.js b/apps/backend/src/routes/uploadVideo.js
index a98dc045..2acba3a7 100644
--- a/apps/backend/src/routes/uploadVideo.js
+++ b/apps/backend/src/routes/uploadVideo.js
@@ -8,8 +8,8 @@ const unlinkAsync = promisify(fs.unlink);
const { Upload } = require('@aws-sdk/lib-storage');
const {
- S3Client,
- PutObjectCommand
+ S3Client
+ // PutObjectCommand
// GetObjectCommand,
} = require('@aws-sdk/client-s3');
@@ -19,6 +19,7 @@ const genUniqueId = require('../utils/genUniqueId');
const upload = require('../utils/upload');
const {
+ CLOUDFLARE_BUCKET_DOMAIN,
CLOUDFLARE_ACCESS_KEY,
CLOUDFLARE_SECRET_ACCESS_KEY,
CLOUDFLARE_ACCOUNT_ID,
@@ -75,7 +76,10 @@ router.post('/', upload.single('videoFile'), async (req, res) => {
const fileName = `${genUniqueId()}-${file.originalname.split(' ').join('-')}`;
- const fileUrl = `https://pub-${CLOUDFLARE_PUBLIC_ACCOUNT_ID}.r2.dev/${fileName}`;
+ const fileOrigin =
+ CLOUDFLARE_BUCKET_DOMAIN ?? `https://pub-${CLOUDFLARE_PUBLIC_ACCOUNT_ID}.r2.dev`;
+
+ const fileUrl = `${fileOrigin}/${fileName}`;
let metadata = {
sizeInMb: fileSizeInMegabytes
};
diff --git a/apps/backend/uploads/.empty b/apps/backend/uploads/.empty
new file mode 100644
index 00000000..e69de29b
diff --git a/apps/classroomio-com/src/lib/Body/Body.svelte b/apps/classroomio-com/src/lib/Body/Body.svelte
index 2365e756..287fc56d 100644
--- a/apps/classroomio-com/src/lib/Body/Body.svelte
+++ b/apps/classroomio-com/src/lib/Body/Body.svelte
@@ -9,7 +9,7 @@
taglineIcon="simplified"
title="Advanced Course Management"
description="ClassroomIO simplifies teaching tasks, boosts the educational experience, and is beneficial for both educators and students, providing a user-friendly platform for assessment, grading, attendance, and scorebook management."
- video="/course-management.mp4"
+ video="https://brand.cdn.clsrio.com/course-management.mp4"
rightToLeft={true}
/>
-
diff --git a/apps/classroomio-com/src/lib/StudentDashboard/StudentDashboard.svelte b/apps/classroomio-com/src/lib/StudentDashboard/StudentDashboard.svelte
index be5b1306..b38eb446 100644
--- a/apps/classroomio-com/src/lib/StudentDashboard/StudentDashboard.svelte
+++ b/apps/classroomio-com/src/lib/StudentDashboard/StudentDashboard.svelte
@@ -29,10 +29,7 @@
playsinline
preload="auto"
>
- ]+src\s*=\s*['"]([^'"]+)['"][^>]*>/i;
const srcMatch = content.match(srcRegex);
if (srcMatch) {
// 2. Point the formula to our server
- const customAPI = PUBLIC_SERVER_URL + '/katex'
+ const customAPI = PUBLIC_SERVER_URL + '/katex';
const url = srcMatch[1]?.replaceAll('https://latex.codecogs.com/svg.image', customAPI);
// 3. Fetch the HTML from the server
const response = await fetch(url);
- const html = await response.text();
+ const html = await response.text();
// 4. Set the content to the html
content = `
${html}
`; } else { - console.error("No src attribute found in the img tag."); + console.error('No src attribute found in the img tag.'); } tinymce.activeEditor.execCommand('mceInsertContent', false, content); diff --git a/apps/docs/pages/contributor-guides/student-dashboard.mdx b/apps/docs/pages/contributor-guides/student-dashboard.mdx index 73a261ae..240c6bb5 100644 --- a/apps/docs/pages/contributor-guides/student-dashboard.mdx +++ b/apps/docs/pages/contributor-guides/student-dashboard.mdx @@ -17,6 +17,15 @@ In this guide I will be showing you how to set up a local student dashboard that ### Demo - +