mtamc / memo

Website for rating books, movies, video games, and TV shows.
0 stars 0 forks source link

Memo

Workflow

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.

Web Development Stack

We use:

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.

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.