This project is a React application built with TypeScript that consumes data from the JSONPlaceholder API. It allows users to:
- List all posts
- Show all comments for a given post
- Write, update, and delete a comment
Make sure you have the following installed on your machine:
- Clone the repository:
git clone https://github.com/nunof-castro/react-ts-posts cd react-ts-posts
- Install the dependencies:
yarn install
- Create a .env file in the root of the project and add the following line, specifying the URL of the API:
You can use the provided .env.example file as a reference.
REACT_APP_API_URL=https://jsonplaceholder.typicode.com
To start the development server, run:
yarn start
This will start the application at http://localhost:3000.