1. Locally. Running the website locally is recommended to test changes before pushing commits.
# install the dependencies
npm install
# you will need to run these once
npx netlify login # requires being logged into netlify, ask for credentials
npx netlify link # when it asks what linking method to use, choose github
# The app will then be available locally for building with
npx netlify dev
# Deprecated alternative
npm run dev
If you use npx netlify dev
your serverless functions will also be available at:
GET http://localhost:8888/.netlify/functions/<function_file_name_without_extension>
2. Staging branch. Generally you should push commits directly to staging. Pull requests aren't really necessary due to the small team size, but if you'd like code review send a PR to merge to staging.
3. Production branch. Merge staging to production whenever you think the changes are ready. Deploys to the website from production are automatic.
We use:
- Netlify for web hosting and deployment
- Node and NPM for runtime environment and package management
- Eleventy for static site generation
- A tiny inline JS pipeline with a component-based architecture
- Serverless (FaaS) development pipeline with Netlify Dev and Netlify Functions
Credentials.
This project is deployed via netlify with the account {ask}
(ask me for password).
External API keys are set in Netlify
environment variables. They are also avaiable in production inside
process.env
.
You might need to run npx netlify login
inside the project.
Netlify plugins.
- Identity. Managed at https://app.netlify.com/sites/td-memo/identity
- FaunaDB. Managed at https://dashboard.fauna.com by logging in with netlify account integration.
DB
We currently use mongoDB, logged into via the MONGODB_URL
Error handling.
Error handling is done using neverthrow
, which is similar to
Rust Result or FP Either. Learn more about its API at:
https://github.com/supermacro/neverthrow
Current rate limits.
-
TV/Series
- TMDB API: unlimited
-
Google Books API
- Potentially 1000/day with key, with easy free application for 100k (warning: old information)
- Right now we're not using an API key. If you want to try, then sign up for one and add GOOGLE_API_KEY to the Netlify environment variables. The code will automatically pick it up.
- Potentially 1000/day with key, with easy free application for 100k (warning: old information)
-
Games
- IGDB: 4 reqs/sec (currently fetching details takes 2 requests due to getting company names)
- HLTB scraping: unknown but at least near-unlimited