This portfolio project was created as part of a Digital Skills Bootcamp in Software Engineering provided by Northcoders.
Hosted API NC News
This project showcases RESTful API's designed to manage articles and comments, providing users with the ability to create, read, update, and delete (CRUD) articles and comments.
Node: v20.12.2 +
pSQL: 14.13 +
To get started with this project, follow the steps below:
First you need to fork this repo to your GitHub account by clicking fork button near the top right of this page. If you are unfamiliar with this then please follow this GitHub guide.
The next step is cloning this to your local device using the follwoing command, changing the "your-username" to your GitHub username:
git clone github.com/your-username/nc-news-be
Once forked you will need to add a .env file in the root directory for each enviroment you wish to use.
-
For testing you will need a file called ".env.test" with the name of your test database.
-
For development a ".env.development" with your development database.
Inside these you will need to link your database by putting the following code inside, replacing "database_name_here" with your database name:
PGDATABASE=database_name_here
Now this has been done install all the npm dependencies by running the following command in your terminal/ cli:
npm install
With your environment variables configured and dependencies installed, you can set up the pSQL database and seed them with initial data using the following commands:
npm setup-dbs
npm seed