Now News is a news website, displaying the latest news fetched from an external api.
Visit here: https://nownews.lesliepn.info/
- Frontend: React, Typescript
- Backend: Node.js, JavaScript, express
The following dependencies are required to run this project:
- axios: ^1.2.5
- cors: ^2.8.5
- dotenv: ^16.0.3
- dotenv-webpack: ^8.0.1
- express: ^4.18.2
- react: ^18.2.0
- react-dom: ^18.2.0
- react-router-dom: ^6.8.0
To install all the required dependencies, you can run the following command:
pnpm install
This application consumes an external API: News API. You need an API key to use the API.
- Get your API key from News API.
- Create
.env
file in the root directory. - Inside the
.env
file you created, define your API key.
API_KEY=samplekeyfromnewsapi
News API's free tier plan only allows up to 100 requests per day. When the limit exceeds, the page will no longer be able to display data from the api for a certain time period. As a fallback, a Demo Website is provided which only displays placeholder content.
To create production-ready build, run the command:
pnpm run build
Check the package.json
file and make sure the scripts are configured correctly.