Skip to content

Latest commit

 

History

History
155 lines (97 loc) · 3.33 KB

README.md

File metadata and controls

155 lines (97 loc) · 3.33 KB

MIT License LinkedIn

LiReddit

An online discussion forum developed with multiple popular technologies
· Report Bug · Request Feature

Table of Contents

About The Project

Lireddit screenshot

To keep updating my current web development skills, I decided to develop this full-stack web application to continue to learn and grow my skills using some cutting-edge technologies. This application allows users to authenticate, create a post, update their posts, upvote or downvote a post etc. Server-side rendering and caching have been enabled in this application.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • npm
npm install npm@latest -g
  • TypeScript
npm install -g typescript
  • PostgreSQL
  • Redis

Installation

  1. Clone the repo
git clone https://github.com/cyw233/lireddit.git
  1. Create a .env file in the server folder and add following env variables
DATABASE_URL=postgresql://<pg_username>:<pg_password>@localhost:5432/<pg_db_name>
REDIS_URL=127.0.0.1:6379
PORT=4000
SESSION_SECRET=<random_string>
CORS_ORIGIN=http://localhost:3000
  1. Install NPM packages and compile backend
cd server
npm install
npm run watch
# Open a new terminal
npm run dev
  1. Create a .env.local file in the web folder and add following env variables:
NEXT_PUBLIC_API_URL=http://localhost:4000/graphql
  1. Install NPM packages and compile frontend
cd web
npm install
npm run dev

Usage

After the installation, open you browser and go to localhost:3000 to start using the app. You can start by registering a new user.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Chenyang Wang - chenyangw233@gmail.com