diff --git a/.meteor/packages b/.meteor/packages index 5346828..c866ba8 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -4,27 +4,29 @@ # 'meteor add' and 'meteor remove' will edit this file for you, # but you can also edit it by hand. -meteor-base@1.5.2 # Packages every Meteor app needs to have -mobile-experience@1.1.2 # Packages for a great mobile UX -mongo@2.1.4 # The database Meteor supports right now +meteor-base@1.5.1 # Packages every Meteor app needs to have +mobile-experience@1.1.1 # Packages for a great mobile UX +mongo@1.16.10 # The database Meteor supports right now blaze-html-templates # Compile .html files into Meteor Blaze views jquery # Wrapper package for npm-installed jquery -reactive-var@1.0.13 # Reactive variable for tracker -tracker@1.3.4 # Meteor's client-side reactive programming library +reactive-var@1.0.12 # Reactive variable for tracker +tracker@1.3.3 # Meteor's client-side reactive programming library -standard-minifier-css@1.9.3 # CSS minifier run for production mode -standard-minifier-js@3.1.1 # JS minifier run for production mode -es5-shim@4.8.1 # ECMAScript 5 compatibility for older browsers -ecmascript@0.16.13 # Enable ECMAScript2015+ syntax in app code -typescript@5.6.6 # Enable TypeScript syntax in .ts and .tsx modules -shell-server@0.6.2 # Server-side component of the `meteor shell` command +standard-minifier-css@1.9.2 # CSS minifier run for production mode +standard-minifier-js@2.8.1 # JS minifier run for production mode +es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers +ecmascript@0.16.8 # Enable ECMAScript2015+ syntax in app code +typescript@4.9.5 # Enable TypeScript syntax in .ts and .tsx modules +shell-server@0.5.0 # Server-side component of the `meteor shell` command -hot-module-replacement@0.5.4 # Update code in development without reloading the page +hot-module-replacement@0.5.3 # Update code in development without reloading the page blaze-hot # Update files using Blaze's API with HMR -roles@1.0.1 -session@1.2.2 -email@3.1.2 -arianjahiri:meteor-handlebars-helpers -ostrio:flow-router-extra -accounts-password@3.2.1 +alanning:roles@2.2.0 +email@2.2.6 +session@1.2.1 + +raix:handlebar-helpers +kadira:flow-router +kadira:blaze-layout +accounts-password@2.4.0 diff --git a/.meteor/release b/.meteor/release index 4876d6f..5152abe 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@3.3.2 +METEOR@2.16 diff --git a/.meteor/versions b/.meteor/versions index 9d06cad..6007c47 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,94 +1,94 @@ -accounts-base@3.1.2 -accounts-password@3.2.1 -allow-deny@2.1.0 -arianjahiri:meteor-handlebars-helpers@0.0.1 -autoupdate@2.0.1 -babel-compiler@7.12.2 -babel-runtime@1.5.2 -base64@1.0.13 -binary-heap@1.0.12 -blaze@3.0.2 -blaze-hot@2.0.0 -blaze-html-templates@3.0.0 -blaze-tools@2.0.0 -boilerplate-generator@2.0.2 -caching-compiler@2.0.1 -caching-html-compiler@2.0.0 -callback-hook@1.6.1 -check@1.4.4 -core-runtime@1.0.0 -ddp@1.4.2 -ddp-client@3.1.1 -ddp-common@1.4.4 -ddp-rate-limiter@1.2.2 -ddp-server@3.1.2 -deps@1.0.5-pre.1 -diff-sequence@1.1.3 -dynamic-import@0.7.4 -ecmascript@0.16.13 -ecmascript-runtime@0.8.3 -ecmascript-runtime-client@0.12.3 -ecmascript-runtime-server@0.11.1 -ejson@1.1.5 -email@3.1.2 -es5-shim@4.8.1 -facts-base@1.0.2 -fetch@0.1.6 -geojson-utils@1.0.12 -hot-code-push@1.0.5 -hot-module-replacement@0.5.4 -html-tools@2.0.0 -htmljs@2.0.1 -id-map@1.2.0 -inter-process-messaging@0.1.2 -jquery@3.0.2 -launch-screen@2.0.1 -localstorage@1.2.1 -logging@1.3.6 -meteor@2.1.1 -meteor-base@1.5.2 -minifier-css@2.0.1 -minifier-js@3.0.4 -minimongo@2.0.4 -mobile-experience@1.1.2 -mobile-status-bar@1.1.1 -modern-browsers@0.2.3 -modules@0.20.3 -modules-runtime@0.13.2 -modules-runtime-hot@0.14.3 -mongo@2.1.4 -mongo-decimal@0.2.0 -mongo-dev-server@1.1.1 -mongo-id@1.0.9 -npm-mongo@6.16.1 -observe-sequence@2.0.0 -ordered-dict@1.2.0 -ostrio:flow-router-extra@3.12.0 -promise@1.0.0 -random@1.2.2 -rate-limit@1.1.2 -react-fast-refresh@0.2.9 -reactive-dict@1.3.2 -reactive-var@1.0.13 -reload@1.3.2 -retry@1.1.1 -roles@1.0.1 -routepolicy@1.1.2 -session@1.2.2 -sha@1.0.10 -shell-server@0.6.2 -socket-stream-client@0.6.1 -spacebars@2.0.0 -spacebars-compiler@2.0.0 -standard-minifier-css@1.9.3 -standard-minifier-js@3.1.1 -templating@1.4.4 -templating-compiler@2.0.0 -templating-runtime@2.0.1 -templating-tools@2.0.0 -tracker@1.3.4 -typescript@5.6.6 -underscore@1.6.4 -url@1.3.5 -webapp@2.0.7 -webapp-hashing@1.1.2 +accounts-base@2.2.11 +accounts-password@2.4.0 +alanning:roles@2.2.0 +allow-deny@1.1.1 +autoupdate@1.8.0 +babel-compiler@7.10.5 +babel-runtime@1.5.1 +base64@1.0.12 +binary-heap@1.0.11 +blaze@2.9.0 +blaze-hot@1.1.2 +blaze-html-templates@1.2.1 +blaze-tools@1.1.4 +boilerplate-generator@1.7.2 +caching-compiler@1.2.2 +caching-html-compiler@1.2.2 +callback-hook@1.5.1 +check@1.4.1 +ddp@1.4.1 +ddp-client@2.6.2 +ddp-common@1.4.1 +ddp-rate-limiter@1.2.1 +ddp-server@2.7.1 +deps@1.0.12 +diff-sequence@1.1.2 +dynamic-import@0.7.3 +ecmascript@0.16.8 +ecmascript-runtime@0.8.1 +ecmascript-runtime-client@0.12.1 +ecmascript-runtime-server@0.11.0 +ejson@1.1.3 +email@2.2.6 +es5-shim@4.8.0 +fetch@0.1.4 +geojson-utils@1.0.11 +hot-code-push@1.0.4 +hot-module-replacement@0.5.3 +html-tools@1.1.4 +htmljs@1.2.1 +id-map@1.1.1 +inter-process-messaging@0.1.1 +jquery@3.0.0 +kadira:blaze-layout@2.0.1 +kadira:flow-router@2.12.1 +launch-screen@2.0.0 +localstorage@1.2.0 +logging@1.3.4 +meteor@1.11.5 +meteor-base@1.5.1 +minifier-css@1.6.4 +minifier-js@2.8.0 +minimongo@1.9.4 +mobile-experience@1.1.1 +mobile-status-bar@1.1.0 +modern-browsers@0.1.10 +modules@0.20.0 +modules-runtime@0.13.1 +modules-runtime-hot@0.14.2 +mongo@1.16.10 +mongo-decimal@0.1.3 +mongo-dev-server@1.1.0 +mongo-id@1.0.8 +npm-mongo@4.17.2 +observe-sequence@1.0.22 +ordered-dict@1.1.0 +promise@0.12.2 +raix:handlebar-helpers@0.2.5 +random@1.2.1 +rate-limit@1.1.1 +react-fast-refresh@0.2.8 +reactive-dict@1.3.1 +reactive-var@1.0.12 +reload@1.3.1 +retry@1.1.0 +routepolicy@1.1.1 +session@1.2.1 +sha@1.0.9 +shell-server@0.5.0 +socket-stream-client@0.5.2 +spacebars@1.6.0 +spacebars-compiler@1.3.2 +standard-minifier-css@1.9.2 +standard-minifier-js@2.8.1 +templating@1.4.3 +templating-compiler@1.4.2 +templating-runtime@1.6.4 +templating-tools@1.2.3 +tracker@1.3.3 +typescript@4.9.5 +ui@1.0.13 +underscore@1.6.2 +url@1.3.2 +webapp@1.13.8 +webapp-hashing@1.1.1 diff --git a/Dockerfile b/Dockerfile index 5064534..6cf4fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ -FROM node:22.16.0-alpine +FROM alpine:3.17 + +ENV NODE_VERSION=14.21.4 +ENV NODE_URL="https://static.meteor.com/dev-bundle-node-os/unofficial-builds/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" +ENV DIR_NODE=/usr/local RUN apk add --no-cache \ libstdc++ \ @@ -16,6 +20,13 @@ RUN apk add --no-cache \ ccache \ xz +RUN echo $NODE_URL +RUN curl -sSL "$NODE_URL" | tar -xz -C /usr/local/ && mv $DIR_NODE/node-v${NODE_VERSION}-linux-x64 $DIR_NODE/v$NODE_VERSION + +# add node and npm to path so the commands are available +ENV NODE_PATH $DIR_NODE/v$NODE_VERSION/lib/node_modules +ENV PATH $DIR_NODE/v$NODE_VERSION/bin:$PATH + # confirm installation RUN node -v RUN npm -v @@ -27,11 +38,11 @@ ENV MONGO_URL=mongodb://mongo:27017/get_my\ RUN mkdir -p /usr/src/get_my WORKDIR /usr/src/get_my -COPY ../bundle/ /usr/src/get_my/ +COPY bundle/ /usr/src/get_my/ RUN cd /usr/src/get_my/programs/server/ \ && npm install EXPOSE 3000 -CMD [ "node", "main.js" ] \ No newline at end of file +CMD [ "node", "main.js" ] diff --git a/README.md b/README.md index 8590db0..6b3d1b8 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,6 @@ The documentation is being done in the amazing open source software [Bookstack]( If you'd like to contribute by writing some documentation, please contact me me with an, and I'll see about getting you access to contribute. -I have a video introduction on my YouTube channel here as well: https://youtu.be/hbGNTzU24hI?si=K5mcb8FuzSWNCueB - ## Keeping it Simple - Registration / Login System built in - 1st user to register is the system admin by default. diff --git a/client/Accounts/Login/login.js b/client/Accounts/Login/login.js index f436e4b..7f3c38a 100644 --- a/client/Accounts/Login/login.js +++ b/client/Accounts/Login/login.js @@ -1,5 +1,4 @@ import { SysConfig } from '../../../imports/api/systemConfig.js'; -import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; Template.login.onCreated(function() { this.subscribe("SystemConfig"); @@ -26,7 +25,7 @@ Template.login.helpers({ Template.login.events({ 'click #logmein' (event) { event.preventDefault(); - // console.log("clicked login"); + console.log("clicked login"); let email = $("#email").val(); let pass = $("#password").val(); diff --git a/client/Accounts/Login/reg.js b/client/Accounts/Login/reg.js index 2a46225..c2ddbe2 100644 --- a/client/Accounts/Login/reg.js +++ b/client/Accounts/Login/reg.js @@ -1,5 +1,4 @@ import { SysConfig } from "../../../imports/api/systemConfig.js"; -import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; Template.reg.onCreated(function() { this.subscribe("SystemConfig"); @@ -30,16 +29,12 @@ Template.reg.helpers({ return Session.get("missingReq"); }, allowReg: function() { - const sysConf = async() => { - let conf = await SysConfig.findOneAsync(); - if (!conf) { - return true; - } else { - return conf.allowReg; - } + let conf = SysConfig.findOne(); + if (typeof conf != 'undefined') { + return conf.allowReg; + } else { + return true } - let sysConfig = sysConf(); - return sysConfig; } }); @@ -88,17 +83,15 @@ Template.reg.events({ }); let userId = Meteor.userId(); - // console.log("User ID: " + userId); - const addRole = async() => { - let result = await Meteor.callAsync("addToRole", "user"); - if (!result) { - console.log(" ERROR: ROLES - Error adding user to role: "); + console.log("User ID: " + userId); + Meteor.call("addToRole", "user", function(err, result) { + if (err) { + console.log(" ERROR: ROLES - Error adding user to role: " + err); } else { // console.log("User should be added to role - teacher."); FlowRouter.go('/dashboard'); } - } - addRole(); + }); } } }, diff --git a/client/Accounts/UserMgmt/userInfoModal.html b/client/Accounts/UserMgmt/userInfoModal.html index 156a66a..e25fda3 100644 --- a/client/Accounts/UserMgmt/userInfoModal.html +++ b/client/Accounts/UserMgmt/userInfoModal.html @@ -15,7 +15,7 @@ {{#if $eq passMatch false}}
Passwords do not match!
{{/if}} -