0:00
Hello and welcome to Web Applications for Everybody.
In this presentation, we're going to talk
about how to submit your assignment to an Autograder.
Now, we don't use the Autograder until later in the course.
And in the first assignment,
just guessing game assignment in this course,
we have a lot of documentation about how to use the Autograder.
And so, the idea of the Autograder is that you're going to
submit your running application to
the Autograder and the Autograder is going to
send request to your application and look at the responses.
The problem is, if you got your application running on your localhost,
which is the way you are doing that,
you can't simply pass this local host value into the running applications.
Okay. Because localhost is
a very special address and localhost only
works from the browser that's running on your computer,
talking to the server that's running on your computer.
So, localhost is not sort of an external address.
And so we have to temporarily give your server an external address.
Now, normally your server is fire-walled away from
incoming connections and so we have to kind of break an opening through the firewall.
And there's a couple of different applications that can do this.
One of them is called ngrok and one is called LocalTunnel,
where in this video I'm going to demonstrate the use of LocalTunnel.
So, a LocalTunnel is a little weird in that LocalTunnel is a little hard to install.
Okay. So, here's a LocalTunnel website.
You're welcome to use this website,
but this NPM stuff on your computer,
you might, it's hard to get to the point where NPM is working.
And if you are already a sophisticated web developer and you have NPM,
which is the Node Package Manager,
then fine, this is really great and this is really easy.
So, this makes sense to you. But, I'm expecting that most of you are not
going to want to run it.
And so, I built a LocalTunnel for Macintosh that makes it,
so that it serves a single click install. So here we go.
I'm going to click on this and it's going to download
this zip file and I'm going to show this in the finder.
So here we go and I'm going to double click on the Macintosh document.
And so, this is an executable.
So, I'm going to put that in the downloads folder.
And now what I'm going to do is I'm going to run
a terminal program and I'm going to go into my desktop.
I'm going to do an LS on my desktop, downloads.
So, on my downloads, do my LS,
it's always good to do an LS to make sure we're in the right spot.
Here's the LT Mac file that I just downloaded.
And so, what I'm going to do is just run this command./lt-mac-port 8888.
And so, it just happens that my Mac runs on port 8888 locally.
And what this is going to do is this is going to copy everything on
port 8888 out to the Internet and give us a temporary domain name.
So, this domain name is really important.
And so, I can basically take this URL and just replace a localhost 8888,
don't put the 8888 on because it's actually taken the port as well.
And so, now, I have this slash wa4e/solutions/guess/guess/php and now I can hit this.
Now, this is the exact same thing,
it's really my local URL,
but it's my stuff running on my server,
it's just it has a temporary domain name,
just long enough for you to turn in your assignment. Okay.
So, then what you do is you copy this,
first you want to get it working like this in your browser and make sure that it
comes back with the page you expect to come back to because if it doesn't work here,
it's not going to work here with the Autograder.
Now, this is particularly solution and I'm supposed to make my right answer be
50 and so this Autograder is not going to work very well.
Okay. It's not going to give me full credit.
And so, it's trying to find some things and it's telling me with these toggles,
you can also look and see what it's complaining about.
See the pages and so even if I've made all kinds of mistakes,
72% with all these mistakes.
And so, that all of that went right back into my assignments and so away we go.
And so, that basically summarizes how we use Localtunnel.
You can also use ngrok, but how we use
Localtunnel to submit running applications to the Autograder.