all templates
APIs & Data

NASA Photo of the Day

The same fetch idea — but now with a real backend hiding the API key.

Show NASA's picture of the day, fetched through your own tiny Node server. This is the tutorial where you learn why apps have backends: to hold secrets. The key stays on the server and never reaches the browser.

What's inside

  • A complete Node backend with zero npm packages
  • Serves the page and proxies the API in one file
  • The API key lives in .env, never in the browser
  • The proxy pattern, drawn out and explained
  • Runs with a single `node server.js`

Quickstart

$ git clone https://github.com/devai-io/devai_boilerplates.git$ cd devai_boilerplates/nasa-photo-proxy$ cp .env.example .env   # optional: add your own key$ node server.js   # then open http://localhost:8080

Browse the code

The full source, exactly as it ships in the repo.

loading…
Download .zip
loading tree…

about this tutorial

A devai.io starter tutorial — your first real backend, and the reason to have one.