A simple clone of the service privnote.com.
I made this one as a little side-project to experiemnt with a few technologies I wanted to learn more about, primarily:
- react-router - client side router
- react-snap - static page generation
- loadable-components - bundle splitting/easy dynamic React imports
- styled-components - nice css-in-JS
- netlify - static website hosting
- AWS lambda - via netlify for running "serverless" backend
# the database here is redis, so you'll need that
# (osx install w/ homebrew)
$ brew install redis
# install dependencies
$ npm install
# start the webpack dev server (runs on port 3000)
$ npm start
# start the local netlify lambda server (runs on port 9000)
$ REDIS_AUTH= REDIS_HOST=127.0.0.1 REDIS_PORT=6379 npm run start:lambda
Setup a Redis server
An easy way to get this going is to setup a little Digital Ocean droplet ($5/mo) and follow these instructions. Make sure to setup the auth
to password protect it and a Floating IP (free) so you can always access the the server from a static IP.
Deploy web app to Netlify
An easy way to deploy the website is fork this repo, then use the following button:
After deploying, setup these environment vars to redis server:
REDIS_HOST
- the IP address or name of host where redis lives.REDIS_PORT
- the port the server is listening on (6379 is the default).REDIS_AUTH
- your redis auth password.
PRs and issues welcome, thanks!