This is a backend api project containing a database of 4 linked tables. Users can write news articles about several topics and can leave comments underneath.
The hosted version can be found online here:
https://northcoders-news-app-ei5k.onrender.com/api
A list of all available endpoints, and their behaviours, can be found in the endpoints.json file
-
Clone the repository by typing
git clone https://github.com/rocrawfd/project-nc-news
into your terminal. It will now be accessible on your local device. -
Open the repo and install the dependencies using
npm install
. -
Use the scripts in the package.json file to help.
To drop and create the database:npm run setup-dbs
To seed the dev data:npm run seed
-
To run the tests, in the tests folder, use
npm test
. -
In order to connect to the databases, you must create...
.env.development
.env.test
and input the database names in each file using...
PGDATABASE=database-name
You may request the database names to be sent privately.
Minimum versions:
Node.js: v21.6.1
Postgres: 15.6