An online discussion forum developed with multiple popular technologies
·
Report Bug
·
Request Feature
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.
To get a local copy up and running follow these simple steps.
- npm
npm install npm@latest -g
- TypeScript
npm install -g typescript
- PostgreSQL
- Redis
- Clone the repo
git clone https://github.com/cyw233/lireddit.git
- Create a
.env
file in theserver
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
- Install NPM packages and compile backend
cd server
npm install
npm run watch
# Open a new terminal
npm run dev
- Create a
.env.local
file in theweb
folder and add following env variables:
NEXT_PUBLIC_API_URL=http://localhost:4000/graphql
- Install NPM packages and compile frontend
cd web
npm install
npm run dev
After the installation, open you browser and go to localhost:3000 to start using the app. You can start by registering a new user.
Distributed under the MIT License. See LICENSE
for more information.
Chenyang Wang - chenyangw233@gmail.com