Skip to content
main
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

https://www.georgegillams.co.uk/

Build status Dependencies status

This is the code for my personal website. The project uses React, Redux, and has a Node API which talks to a Redis database.

I use my site to experiment with things, share stuff I've figured out, and allow people to reach-out to me. So if you're interested in anything I do, get in touch!

Developing

Prerequisites

Ensure redis is installed (brew install redis).

Running locally

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm ci
npm run dev

npm run dev will set all necessary environment variables needed to run the application.

A debugger can be attached to debug server-side code.

Testing

If components have changed, snapshot tests may need to be updated. Backstop js visual regression tests may also need to be updated.

To update jest snapshots:

npx jest -u

To update backstopJS snapshots:

docker build -t georgegillams-test -f Dockerfile.backstopjstest .
docker run georgegillams-test
docker cp DOCKER_CONTAINER_ID:/usr/src/tmp/backstop_data ./

Any changes resulting from these commands should be verified and checked in.

Hosting

The following environment variables should be set up

Env var Reason Value
GSUITE_APP_PASSWORD To send emails from your Gmail account The password generated to access yout G-Suite account
GSUITE_EMAIL To send emails from your Gmail account Your G-Suite email address
NODE_ENV Makes the magic happen production
REDIS_URL To access the redis database. If no URL is provided, the server will connect to a local redis instance.
SECRET_API_KEY Used to make admin API requests Anything secret and impossible to guess
SESSION_SECRET Used to sign cookies Anything secret and impossible to guess
STRIPE_PUBLIC_API_KEY Used to enable card payments Comes from the Stripe dashboard
STRIPE_SECRET_API_KEY Used to enable card payments Comes from the Stripe dashboard

Hosting on Heroku

To host this on Heroku, you will need to add the Heroku-redis Add-on. Doing so will create a the REDIS_URL environment variable required to connect to the DB. The server code will automatically use this connection if present instead of connecting to a local instance.

Contributing

Contributions are welcome. Please fork and submit a PR if you want to add or change a feature.

About

The code for my personal website

Resources

License

Packages

No packages published
You can’t perform that action at this time.