I’ve just built a simple app to help my students to follow my lectures in the operating system Linux and want to share my experience with you.
What does my application do?
I use the command line most of the time in my lectures. The terminal window is shown using a video projector, and I should wait a few seconds before pressing the Enter key, so that the students can read my command line.
Far too often, I don’t wait this period, and so I’m frequently asked to show the command line again.
I’ve tried tools, which show the last keystrokes on the screen, but reading something like this wouldn’t help that lot
Ctrl+r SPC -k⌫lsa
I’m seasoned web developer, so a web application was the obvious solution for me. It should capture the command line and show it on the web page.
Capturing the command line is done by client written as Bash script, using
curl to send the command line via a REST API. The server is a Meteor application, which receives the command lines, stores it into a Mongo database and shows it on the screen
Which components are in use for the server?
I’m a big fan of Meteor since many years. I selected Pup from @cleverbeagle to start the project. I’ve read the documentation before, but as we say in German: “Probieren geht über studieren.” And so I took this a chance to take a deeper look into it.
In the past, I’ve mostly used no boilerplate with Meteor and stuck to the Meteor Guide. So, I’ve found a few differences:
- The Meteor Guide uses
ValidatedMethod, Pup uses the traditional
Meteor.methodcall. Pup uses both the
audit-argument-checkspackages as well as
simpl-schemafrom @aldeed. The Meteor Guide still refers to the old and deprecated
- Pup uses SSR, it is fully pre-configured. It was the first time, I’ve used Meteor with SSR, so I’d to learn how to deal with errors about TypeErrors for Meteor.subscribe. Now, I know the reason for the several
Meteor.isClientconditions in the code
That’s all. I’ve found my way through the boilerplate really fast
The REST interface for the Bash script has been realized using simple:rest with simple:rest-accounts-password. Integrating it was really simple. Just do
meteor add simple:rest simple:rest-accounts-password, and you’re done. No configuration, no additional code line necessary. This is Meteor as I like it.
How long did it take?
The web application is available at https://cmdline.qnipp.com. It still needs some clean-up, but it’s ready for my today’s lecture
I’m curious about the feedback of the students as well as yours.
Thanks to MDG and all the package authors and maintainers to make such a thing possible.