Skip to content

ranven/nutcracker-news

Repository files navigation

🌰 Nutcracker-news 🌰

Idea: Social site/discussion forum similar to Hacker News.

Features

  • Authentication; user can create an account and log in/out.
  • User can read posts on the main feed.
  • User can sort main feed posts by votes, number of comments or time.
  • User can search for posts with keywords.
  • User can create posts for the main feed.
  • User can comment on posts.
  • User can edit their posts and comments.
  • User can upvote or downvote posts.
  • User has an user profile page and they can edit their profile.
  • Users' posts and comments can be viewed from their profile page.

Testing in production

Deployed site is available at https://nutcracker-news.fly.dev/

Due to fly.io's free tier's limitations, the front page might occasionally display no posts or other strange errors might appear. In case this occurs, please refresh the page. (might take a few attempts...)

Local testing

After cloning the repository, run the following commands in the root folder to install dependencies and activate the virtual environment:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Local psql database should also be created and the credentials added to a local .env file in the following format:

DATABASE_URL=[insert url here]
SECRET_KEY=[insert key here]

After completing these steps, start the app with flask run. The app runs the schema.sql file automatically on start.

About

Tietokantasovellus-course project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages