A recreation of Ben Awad's 14 hour Tutorial, but with my own subtle improvements in code quality and developer experience.
Improvements include:
- Test coverage of both the backend and frontend
- Much better UI
- Dark mode
- Image support
- Comments on posts
Original Repository here.
Setup postgresql: here's guides for Ubuntu and Manjaro/Arch.
Create a database called lireddit
:
createdb -U postgres lireddit
Then, in the root project directory, run the following:
cd server
cp .env.EXAMPLE .env
Edit CORS_ORIGIN
and DOMAIN
as needed, and then run
yarn
yarn build
yarn start
cd web
cp .env.production.local.EXAMPLE .env.production.local
Edit the variables as needed, and then run
yarn
yarn build
yarn start
Setup postgresql: here's guides for Ubuntu and Manjaro/Arch.
Create a database called lireddit
, and another called lireddit-test
:
createdb -U postgres lireddit
createdb -U postgres lireddit-test
Run yarn watch
in one terminal window, and yarn dev
in the other.
You get hot reload and database auto-synchronization enabled by default.
Testing: run yarn test
Run yarn dev
to start the next server in development mode.
Testing: run yarn test:frontend
in the server
folder and yarn test
in the
web
folder.