Skip to content

Copy of our fourth semester project. A SNS based on Twitter and Stackoverflow, where you can post, like and comment code snippets.

License

Notifications You must be signed in to change notification settings

leje512/snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Gruppenprojekt Webprogrammierung

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.

Start Vue-Server

Change into app directory

cd frontend/app

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Customize configuration

See Configuration Reference.

Start Postgres with Docker

Change into postgres directory

cd backend/postgres_db

Build and run containers

npm run build 

# or:

docker compose up --build

If db-container is built and up-to-date

npm run serve

# or:

docker compose up

Stop docker containers

npm run stop

# or: 

docker compose down

Access Adminer

On: http://localhost:11000

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

Reset Docker Container and Volumes after changes to SQL commands

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

Start Express-Server

Change into express directory

cd backend/express_server
npm install

Create dotenv-file

node
> console.log(require('crypto').randomBytes(64).toString('hex'))
> .exit

echo HOST=http://localhost > .env
echo PORT=3000 >> .env
echo TOKEN_SECRET=... >> .env

Start Server

On: http://localhost:3000

npm run serve

For development:

npm run dev

About

Copy of our fourth semester project. A SNS based on Twitter and Stackoverflow, where you can post, like and comment code snippets.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published