Code Monkey home page Code Monkey logo

ncn-be's Introduction

Northcoders News API

Link to Hosted Version:
https://ncn-network.onrender.com

Summary:
This project is a live database created from scratch using Node.js and PostgreSQL. It houses articles, topics, comments, and users, all within this codebase that can be queried, posted to, patched, or deleted as needed.

Instructions

Clone Repository

  1. Fork this repository.
  2. Copy the link of your forked repo.
  3. In your terminal, run:
git clone <the link of the forked repo>

Install Dependencies

npm install

Seed Local Database

To set up the databases, run:

npm run setup-dbs

Then, seed the databases:

npm run seed

Run Tests

Install required testing libraries:

npm install jest jest-extended jest-sorted supertest --save-dev

Run tests:

npm t NCN.test.js

Environment Variables

If you need access to the necessary environment variables to connect to the databases locally for development purposes, follow these steps:

  1. Create a file in the root directory called .env.developer.
  2. Set the following environment variable in .env.developer:
    • PGDATABASE=(your-database-name-here)
    • You can find the database name in setup.sql.
    • Use the non-test database for the developer environment variable.
  3. Create another file in the root directory called .env.test.
  4. Set the following environment variable in .env.test:
    • PGDATABASE=(your-test-database-name-here)
    • You can find the test database name in setup.sql.
    • Use the test database for the test environment variable.

Minimum Versions of node

Node.js Version: 20.10.0 (default)

ncn-be's People

Contributors

anthonymedina avatar nc-paul-rogerson avatar p-copley avatar ahuss98 avatar daviidbartlett avatar dav3rid avatar anatdean avatar alexander-cox avatar sssam-c avatar tomosim avatar bainesface avatar callumu21 avatar jimstev2447 avatar isabelmaccabee avatar antariess avatar douglashellowell avatar dentednerd avatar itskatherine avatar liam310 avatar rogersop avatar corkesw avatar elijaharley avatar nicola-20 avatar two-triangles avatar

Stargazers

 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.