Skip to content

0xHecker/beddit-server

Repository files navigation

beddit-server

How to deploy

Server

Setup postgresql: here's guides for Ubuntu and Manjaro/Arch.

Create a database called beddit:

sudo su postgres
psql
create database beddit;

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

Web

cd web
cp .env.production.local.EXAMPLE .env.production.local

Edit the variables as needed, and then run

yarn
yarn build
yarn start

Development setup

Docker image

https://hub.docker.com/repository/docker/shanmukh3/beddit

Backend

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.

Frontend

Run yarn dev to start the next server in development mode.