Skip to content

harrys1000rr/HK-BE-NC-News-Board

Repository files navigation

News and Comment Server

This app is a backend server which hosts news articles.

The data is persisted in an PSQL database and the app uses node-postgres to access and update data.


Installing

First clone project and install dependencies

$ git clone https://github.com/harrys1000rr/HK-BE-NC-News-Board

$ cd be-nc-news

$ npm install

Dependencies

Production

pg-format

express

pg

Development

supertest

nodemon

jest


Deployment

<<<<<<< HEAD You will need to create two .env files for your project: .env.test and .env.development. In each file, add PGDATABASE=<database_name_here>, with the database name for that environment. The default names are nc_news_test and nc_news for the test and dev environments. The .env files should be gitignored.

You need to create two .env files for your project: .env.test and .env.development. In each file, add PGDATABASE=<database_name_here>, with the database name for that environment. The default names are nc_news_test and nc_news for the test and dev environments.

e7a6bff9458834b224a5abc44c5e2f68077b16e1

You should run the script psql -f setup.sql to create the databases. To seed the database in the current ENV, run npm run seed. This will wipe all the data and resets the tables with the original data that is in the db folder in both dev and test environments.


Testing =

Several test suites are provided in the __tests__ folder;

file script useage
utils.test.js npm t utils tests standard util functions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 19