Sign inSign up

donatmolnar/reddit

By donatmolnar

Updated over 5 years ago

Image
0

57

donatmolnar/reddit repository overview

Reddit app

Description

This is a reddit lookalike webapp created purely for learning purposes.

Technical details

Utilized technologies:

  • Frontend: VanillaJS
  • Backend:
  • Node.js 15.8.0
  • Express 4.17.1
  • MySQL 2.18.1
  • Database: MySQL
  • OS: alpine 3.10
Features
  • List entries from the database on the landingpage in form of posts
  • Posts:
  • Add new posts
  • Clicking on post title redirects to the provided url
  • Upvote/downvote posts
  • Modify posts (in progress: ETA TBD)
  • User handling (ETA TBD)
Usage

Pull the image:

docker pull donatmolnar/reddit<:tagname>

To run the image use the following cli command:

docker run -p 3000:<port> -e HOST=<your_database_host> -e USER=<database_user> -e PASS=<database_password> -e DB=<database_name> donatmolnar/reddit[:tag]

Your database should be built like this:

CREATE TABLE `posts` (
	`post_id` INT NOT NULL AUTO_INCREMENT,
	`title` VARCHAR(500) NOT NULL DEFAULT 'placeholder_title',
	`url` VARCHAR(1000) NOT NULL DEFAULT 'http://example.com/',
	`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`score` INT NOT NULL DEFAULT 0,
	`owner` VARCHAR(100) NOT NULL DEFAULT 'placeholder_user',
	`is_active` BOOLEAN NOT NULL DEFAULT true,
	PRIMARY KEY (`post_id`)
);
Reference

Observe the image in action:

Tag summary

Content type

Image

Digest

Size

41.4 MB

Last updated

over 5 years ago

docker pull donatmolnar/reddit