This is a SNS, where users can share short code snippets and like and comment different posts. They can also like the comments. The displayed posts can be sorted (most liked, newest, most liked in the last 24h, most liked in the last 7 days), and filtered for categories. While writing a post, the user chooses a programming language to add syntax highlighting to their code and adds categories, split by spaces. A user can also adjust their username and password. The application consists of a Vue-Server, an Express Server and a Postgres Database.
cd frontend/app
npm install
npm run serve
npm run build
cd backend/postgres_db
npm run build
# or:
docker compose up --build
npm run serve
# or:
docker compose up
npm run stop
# or:
docker compose down
Login:
Server: PostgresSQL
User: web
Password: web
Database: db_v1
Or pre-filled via:
http://localhost:11000/?pgsql=PostgreSQL&username=web&db=db_v1&ns=public
npm run reset
# or:
docker compose down
docker stop `docker ps -a -q` && docker rm `docker ps -a -q`; docker volume prune
docker compose up --build
cd backend/express_server
npm install
node
> console.log(require('crypto').randomBytes(64).toString('hex'))
> .exit
echo HOST=http://localhost > .env
echo PORT=3000 >> .env
echo TOKEN_SECRET=... >> .env
npm run serve
For development:
npm run dev