https://github.com/robson-carvalho/thenews-tech-api
A REST API that sends daily emails to subscribers with the latest technology news.
https://github.com/robson-carvalho/thenews-tech-api
Last synced: 4 months ago
JSON representation
A REST API that sends daily emails to subscribers with the latest technology news.
- Host: GitHub
- URL: https://github.com/robson-carvalho/thenews-tech-api
- Owner: Robson-Carvalho
- Created: 2025-02-08T13:52:59.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-08T15:23:21.000Z (4 months ago)
- Last Synced: 2025-02-08T16:29:17.421Z (4 months ago)
- Language: TypeScript
- Homepage: https://thenews-tech-api.vercel.app
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The News Tech API 💻
Technologies •
Getting Started •
API Endpoints •
Collaborators •
Contribute
A REST API that sends daily emails to subscribers with the latest technology news.
![]()
![]()
![]()
![]()
![]()
💻 Technologies
- Node.js
- Express
- PostgreSQL
- Nodemailer
- TypeScript🚀 Getting started
Here you describe how to run your project locally
Prerequisites
- [Node.js](https://nodejs.org/)
- [Git](https://git-scm.com/)
- [PostgreSQL](https://www.postgresql.org/)Cloning
```bash
git clone https://github.com/Robson-Carvalho/thenews-tech-backend.git
```Config .env variables
Use the `.env.example` as reference to create your configuration file `.env` with the required variables:
```yaml
SMTP_USER=your_user
SMTP_PASS=your_password
```Starting
```bash
cd thenews-tech-backend
npm install
npm start
```📍 API Endpoints
| Route | Method | Description |
| --------------------------------- | ------ | --------------------------------------- |
| POST /subscribe | POST | Subscribes a user to the newsletter |
| GET /subscribers/count | GET | Returns the number of subscribers |POST /subscribe
**REQUEST**
```json
{
"email": "[email protected]"
}
```**RESPONSE**
```json
{
"message": "Subscription successful!"
}
```GET /subscribers/count
**RESPONSE**
```json
{
"count": 1200
}
```🤝 Collaborators
📫 Contribute
1. Fork this repository
2. Create a new branch: `git checkout -b feature/your-feature`
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin feature/your-feature`
5. Open a Pull Request explaining your contribution---
Made with ❤️ by [Robson Carvalho](https://www.linkedin.com/in/robson-carvalho-souza/).