Local Development - archcoder-jd/Fadeout GitHub Wiki
Local Development
Requirements
- Node.js 20.6 or newer. Check with
node --version. If you seecommand not found, install it withbrew install nodeor download the LTS installer from nodejs.org. - A TMDB account with an API Read Access Token.
Setup
- Clone the repo:
git clone https://github.com/archcoder-jd/Fadeout.git cd Fadeout - Create a file named
.envin the project folder:
Use the long token starting withTMDB_TOKEN=your-read-access-tokeneyJ, with no quotes and no spaces around=. - Start the proxy:
No output means it started correctly. It keeps running and waits for requests until you press Ctrl + C.node --env-file=.env server/app.js - Open http://localhost:3000/tmdb/trending/movie/day in a browser. You should see movie data as JSON.
If you change .env, stop the server and start it again, since it only reads the file at startup.
Checking for errors before deploying
Running node server/app.js is the quickest way to catch mistakes in the proxy. If there's a problem, Node stops with an error message and a line number straight away, so you don't have to deploy to find out.
Limitation
The front-end pages request /api/tmdb/... from the same domain they're served from. A basic static server, such as VS Code's Live Server, doesn't provide that route, so movie data won't load when the pages are opened that way. Use the live site to test the full app.