Skip to content

WolfieKnee/be-nc-news

Repository files navigation

NC-News Backend Software Development Project

I completed this #backend project as part of the Software Development Bootcamp with Northcoders. The project, "NC News API", uses psql to setup a database of news articles (think Reddit), and HTTP endpoints with express to make data available to a client. It is now live, with the databased hosted on ElephantSQL and deployed on Render at:

https://nc-news-wa7h.onrender.com/api

where a summary of available endpoints can be seen.

In a few weeks I'll be doing a #frontend project to provide a user interface for this.

Development Process

The project was competed using Test Driven Development (TDD) principles, using Jest and Supertest. Individual endpoints were built their own tickets and GitHub Pull Requests, with code-reviews completed by Senior Software Developers at Northcoders.

Software

This project has been completed using the following software:

  • Node.js. The following additional packages were installed with npm:
    • dotenv
    • express
    • pg
    • pg-format
    • jest
    • jest-extended
    • jest-sorted
    • supertest
  • Jest and SuperTest were used for integration testing
  • node-postgres was used for the psql database.

Setup

The code for this project is available on this GitHub repo and can be cloned using:

    $ git clone https://github.com/WolfieKnee/be-nc-news.git

Npm packages can then be installed:

    $ npm install

I'm obviously keeping my local environment secure and not sharing variables to this public repo, so if you are wanting to use this code you'll need to set up your own .env files for 'test', 'dev' & 'production' databases e.g.:

.env.test

 PGDATABASE=database_name_here

and the databases setup and seeded using the available npm scripts:

    $ npm setup-dbs
    $ npm seed

tests can be run using:

    $ npm test

The database can then be deployed locally:

    $ npm start

Minimum Requirements

  • Node minimum version: v20.8.0
  • PostgreSQL minimum version: v14.10

About

My northcoders backend project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published