Skip to content

yujia1109/Project-NC-news

Repository files navigation

Yujia-News API

Server on heroku

Hosted version link (https://yujia-news.herokuapp.com/api)

Background

This project is building an API for the purpose of accessing application data programmatically. The intention here is to mimic the building of a real world backend service which should provide this information to the front end architecture.

The endpoints.json file describes all the available endpoints on this API.

Installation

The database for this project is PSQL, and can be interacted with it using node-postgres.

Technology

DevDependencies and dependencues

The package.json file contains all the devDependencies and dependencies used in this project.

_DevDependencies

_Dependencies

Database

Database creating

  • Run script "npm setup-dbs" to create the development and test databases.

Database connecting

  • In order to connect to the two databases locally, two .env files: .env.test and .env.development must be created first. Into each, add PGDATABASE=<database_name_here>, with the correct database name for that environment (see /db/setup.sql for the database names).Both of these .env files are .gitignored.

Database seeding

  • Run script "npm seed" to populate the development database.
  • The app.test.js file is populated with test database.

Running the project

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 19