This is a Next.js application that retrieves Medium posts using the Medium API through a custom service file. The project is built with React and uses the react-query
library for fetching data.
To get started with this project, you will need an API key for the Medium API. Here are the steps to get your API key:
- Go to nocodeapi.com and sign up for an account.
- Once you are logged in, navigate to the Medium API page and click on "Connect" to connect your Medium account.
- Follow the steps to authenticate your Medium account and obtain an API key.
- Copy your API key and store it in a safe place.
To install this project on your local machine, follow these steps:
- Clone this repository to your local machine using your preferred method.
- Navigate to the root directory of the project.
- Create a new file called
.env.local
and add the following lines:
MEDIUM_USERNAME=your_medium_username MEDIUM_API_KEY=your_medium_api_key
- Replace
your_medium_username
with your Medium username andyour_medium_api_key
with your Medium API key. - Run
npm install
to install the dependencies. - Run
npm run dev
to start the development server. - Navigate to
http://localhost:3000
in your web browser to view the application.
The application consists of two pages: the home page and the article page.
The home page displays a list of all the Medium posts retrieved from the Medium API. Each post shows the post title and publication date. Clicking on the "Read more" link takes you to the corresponding article page.
The article page displays the full content of a single Medium post. The article title and publication date are also displayed.
Contributions to this project are always welcome! If you would like to contribute, please follow these steps:
- Fork this repository to your own account.
- Clone the repository to your local machine using your preferred method.
- Create a new branch for your changes.
- Make your changes and commit them with a descriptive commit message.
- Push your changes to your forked repository.
- Open a pull request to this repository with a description of your changes.
If you have any questions or comments about this project, please feel free to contact Oreanu.