Code Monkey home page Code Monkey logo

be-im-news's Introduction

Gary-Huynh's nc-news-api

This project is used to simulate a news website with functionality such as bringing up articles, browsing comments, looking for users, adding/changing/deleting articles, comments, topics and includes a voting system for both articles and comments.

Link to hosted site

Installation

First fork the repository then clone the project into your local machine and install the required dependencies.

To run this project with full functionality including testing you will need to install the following:

PSQL - https://www.postgresql.org/download/

dotenv - https://www.npmjs.com/package/dotenv

express - https://www.npmjs.com/package/express

node-postgres - https://www.npmjs.com/package/pg

jest - https://www.npmjs.com/package/jest

jest-sorted - https://www.npmjs.com/package/jest-sorted

pg-format - https://www.npmjs.com/package/pg-format

supertest - https://www.npmjs.com/package/supertest

husky - https://www.npmjs.com/package/husky

Usage

For initial setup after installing required dependencies please do the following

Create the proper environment files in the root including:

.env.development

.env.production

.env.test

Each environment should contain the appropriate paths, for example "PGDATABASE=nc_news"

Now run the following commands:

npm run setup-dbs

npm run seed

npm run seed-prod (will be required if you wish to host on a live server/database)

after please run npm test to check whether all functionality is working as intended

The endpoints.json file should give a brief overview of working endpoints and their functionality

Recommended minimum Postgres 14.7 and Node.js 19.8.1

be-im-news's People

Contributors

i786m avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.