Skip to content

Oliver1334/nodicegames-BE

Repository files navigation

No Dice Games - Backend

No Dice Games is a RESTful API built for a board game review aggregation platform. This backend service provides endpoints for managing reviews, comments, categories, and user interactions. The project was built using Test-Driven Development (TDD) practices, with comprehensive test coverage for all API endpoints and error handling.

View the live API here

This project was developed as part of the Northcoders Full-Stack Software Developer Bootcamp.

Features

  • View all reviews with filtering, sorting, and ordering capabilities
  • Retrieve individual reviews by ID
  • Filter, sort and order reviews via query parameters
  • View, post and delete comments on reviews
  • Upvote or downvote reviews
  • View all users
  • Browse reviews by category

Tech Stack

  • Node.js
  • Express.js
  • PostgreSQL

Testing

  • Jest
  • Supertest

Frontend Repository

The corresponding frontend application can be found here: No Dice Games Frontend

View the live frontend deployment

Installation & Setup

Prerequisites

  • Node.js (minimum version 6.0.0)
  • PostgreSQL (minimum version 8.7.3)

Steps

  1. Clone this repository:
git clone https://github.com/Oliver1334/nodicegames-BE.git
  1. Navigate to the project directory:
cd nodicegames-BE
  1. Install dependencies:
npm install
  1. Set up environment variables:

Create a .env.development file in the root directory:

PGDATABASE=nc_games

Create a .env.test file in the root directory:

PGDATABASE=nc_games_test

Ensure both files are added to .gitignore

  1. Set up the database:
npm run setup-dbs
npm run seed
  1. Start the development server:
npm start

The server will run on localhost:9090

API Documentation

A summary of all available endpoints can be viewed at the /api endpoint.

When running locally, navigate to localhost:9090/api for a complete list of endpoints, request formats, and example responses.

Testing

This application has been fully tested using Jest and Supertest. To run the test suite:

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors