Skip to content

jonathondilworth/nc-news

Repository files navigation

nc-news

Backend API for a simple news application

See the live example hosted here

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

The required software you need to use this project is listed below:

This project was built using psql v14.10 & node v21.2.0.

Installation

  1. Clone the repo:

    git clone https://github.com/jonathondilworth/nc-news.git
  2. Create your .env.test and .env.development files to reference the test and development databases:

    .env.test:

    PGDATABASE=nc_news_test
    

    .env.development:

    PGDATABASE=nc_news
    

    .env.production:

    DATABASE_URL=postgres://db.example.com/
    

    Please check the .env-example file for a template on this projects environment variables.

  3. Install NPM packages:

    npm install
  4. Initialise databases:

    npm run setup-dbs
  5. Seed the development database:

    npm run seed

Running Tests

npm run test

About

Backend API for a simple news application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published