https://github.com/ohmycloud/zero2prod
https://github.com/ohmycloud/zero2prod
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ohmycloud/zero2prod
- Owner: ohmycloud
- Created: 2024-01-24T15:04:59.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-14T04:54:03.000Z (about 1 year ago)
- Last Synced: 2025-07-15T13:36:57.420Z (11 months ago)
- Language: Rust
- Size: 260 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# SQL Migrate
```bash
psql -h localhost -p 5432 -U postgres
create database newsletter;
create database subscriptions;
sqlx migrate run --database-url=postgres://postgres:password@127.0.0.1:5432/newsletter
# or use this script
SKIP_DOCKER=true ./scripts/init_db.sh
```
# Redis setup
```bash
. ./scripts/init_redis.sh
```
# How to use
```bash
curl http://127.0.0.1:8000/health_check
# Send an email with curl
curl "https://api.postmarkapp.com/email" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-Postmark-Server-Token: POSTMARK_API_TEST" \
-d '{"From": "cloud@ohmycloudy.uk", "To": "cloud@ohmycloudy.uk", "Subject": "Hello from Postmark", "HtmlBody": "Hello dear Postmark user."}'
```