Testing a Web Server with Cloud Shell
Articles,  Blog

Testing a Web Server with Cloud Shell


Today, I want to a quick look at how to
use a web server with Cloud Shell First, activate your Cloud Shell. Now I’m going to
make a simple web server in Node.js Here, I’ve pasted my code in. You can see it’s a
simple hello world app that’s listening on port 3000. I’m gonna change that to
port 8080 so it works better with Cloud Shell and now I’m gonna start the node
server just like you would on your local machine. At this point we can start the
web preview. You can choose a different port, but I’m just going to choose port
8080. A new tab gets opened up automatically and we can see our code
running. To show you it runs in real-time, I’m gonna change the code to
say “Hello World, I’m using Cloud Shell”. If I rerun my server and refresh the page I
can see the new code up and running

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *