A simple Node.JS photo uploading and display app
- Node.js
- Linux/Unix: Install
nodejs
by following these instructions. - Windows: Install it with the command
winget install OpenJS.NodeJS.LTS
on modern Windows versions
- Linux/Unix: Install
- npm
- Express.js
- Run
npm install
to ensure that all packages are installed. - Set the environment variable
PORT
- Linux:
export PORT=8080
- Windows:
set PORT=8080
- Linux:
- Run
npm run init
- Run
node index.js
- Open your browser and head to
{HOST-IP}:{PORT}
. If this instance is running locally and thePORT
environment variable is set to8080
, then head tolocalhost:8080
.
- Navigate to https://photogallery317.azurewebsites.net/
- You may need to wait a minute or two if Azure has decided to temporarily spin down the instance that the Node server is running on.
- You will first see a
Login
screen. You will want to press theNew User
button to create an account. Fill in all the fields, and then press theRegister User
button. - You can now log in. Afterwards, you'll see an
Upload a Photo
screen. You can upload any photo you wish alongside tags, or search for photos by tags.- Uploading an image will redirect you to a fullscreen view. Back out with the browser to return to the previous page.
- Searching will ask you for a query. The page will return all images with that tag.
- Afterwards, you can log out, restart the app, and back in to see that both login and images persist.
- Gavin Tersteeg
- Isaiah Mundy
- Yadiel Johnson
- Sam Caldwell