The Taylor Swift Relationships API is a Node.js and Express.js API that provides information about people Taylor Swift has dated in a chronological manner. The API includes their names, dates, and images.
Follow these instructions to set up the project locally on your machine.
Make sure you have the following installed on your machine:
- Node.js: Download and install Node.js
- npm (Node Package Manager): npm is installed with Node.js
- Clone this repository to your local machine:
git clone https://github.com/your_username/TaylorSwiftRelationshipsAPI.git
- Navigate into the project directory:
cd TaylorSwiftRelationshipsAPI
- Install the project dependencies:
npm install
Before running the server, you may need to configure some environment variables. Create a .env
file in the root directory of the project and add the following:
# Example .env file
PORT=3000
Replace 3000
with your desired port number.
To start the Express server, run the following command:
npm start
The server should now be running locally on the port you specified in the .env
file.
- URL:
/relationships
- Method:
GET
- Description: Retrieves all relationships Taylor Swift has been in.
- Response:
- Status: 200 OK
- Body: Array of relationship objects containing names, dates, and images.
- URL:
/relationships/:id
- Method:
GET
- Description: Retrieves a specific relationship by its ID.
- Parameters:
id
: The unique identifier of the relationship.
- Response:
- Status: 200 OK
- Body: Object containing the details of the relationship.
- Status: 404 Not Found if the relationship with the specified ID does not exist.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.