Skip to content

A full-stack application developed as a part of the Helsinki University Full-stack Open course

Notifications You must be signed in to change notification settings

smannist/blog-app

Repository files navigation

Blog app

alt text

JavaScript NodeJS Express.js React React Query React Router TailwindCSS Vite GitHub Actions Docker

Developed as part of the Helsinki University Full-stack Open course. Currently there is no feature for creating an account via the frontend, you will have to manually do this via backend posting or i.e MongoDB Atlas. Frontend is pretty rough and was not really the main focus, but hey, I got to learn Tailwind a little bit. :D

Demo of the app is currently deployed live at Render.

Running the app locally

  1. Clone the repository
  2. Create an .env file in the backend folder

Warning

Never push the .env file to your GitHub repository

  1. Set up the following values in your .env file:

    SECRET=your_secret_string
    PORT=your_chosen_port
    TEST_MONGO_DB_URI=your_test_database_url
    MONGO_DB_URI=your_main_database_url
    

    Replace the placeholders with the following:

    • your_secret_string: Any string value without special characters for your secret.
    • your_chosen_port: The port number you want your backend to run on.
    • your_test_database_url: URL for your test MongoDB database.
    • your_main_database_url: URL for your main MongoDB database.
  2. Build dev environment with docker: docker compose -f docker-compose.dev.yml build

  3. Start dev environment with docker: docker compose -f docker-compose.dev.yml up

  4. docker-compose.yml runs the production app, but it is not ready for deployment yet. If you want to deploy with docker you will have to figure out how to setup the environmental variables.

Running tests locally

There are ready made scripts for running the tests locally. The command is the same for both front- and backend.

npm run test

Running style checks locally

There are ready made scripts for running the style checks locally. The command is the same for both front- and backend.

npm run lint

About

A full-stack application developed as a part of the Helsinki University Full-stack Open course

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages