-
Notifications
You must be signed in to change notification settings - Fork 1
Part 3. Run It
The Node.js server is going to use the PORT
environment variable or default to port 3000 if none is set. Starting with the default port 3000 is simple:
$ npm start
If you want to view the hosted webpage on your Pi's web browser (or whatever device you installed this project), navigate to:
localhost:3000/dashboard
If you want to view the hosted webpage on another device's web browser (like your laptop), first get the ip address of your Pi:
$ hostname -I
Navigate to:
<ip address>:3000/dashboard
You should see something similar to the screenshot above in your web browser. You can make your browser full-screen and hide the top toolbar by following the instructions here.
Congratulations, you just built your very own web server. Let's customize.
*note: This project is intended to provide you the ability to access your hosted webpage from inside your own network (e.g. at work, at home). If you want to open this webpage up to the entire world, that requires you make your device and its IP address accessible to the entire world. Use extreme caution.
Initial State (https://www.initialstate.com)
(c) 2019 Initial State Technologies, Inc.