https://github.com/daliborgogic/dlbr-list
A prelaunch sign up double opt-in microservice
https://github.com/daliborgogic/dlbr-list
docker docker-compose microservice nodejs nodemailer
Last synced: 2 months ago
JSON representation
A prelaunch sign up double opt-in microservice
- Host: GitHub
- URL: https://github.com/daliborgogic/dlbr-list
- Owner: daliborgogic
- Created: 2017-12-25T15:03:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T12:54:35.000Z (over 7 years ago)
- Last Synced: 2025-04-08T13:50:49.293Z (about 1 year ago)
- Topics: docker, docker-compose, microservice, nodejs, nodemailer
- Language: JavaScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dlbr-list
> A prelaunch sign up double opt-in microservice
## Subscribe [/{email}]
+ Parameters
+ email: name@example.com (string) - Subscribers email.
### Send email [GET]
+ Request JSON Message
+ Headers
Accept: application/json
+ Response 200 (application/json)
+ Body
{
"sent": true
}
## OptIn [/{uuid}]
+ Parameters
+ uuid: 5a40e9b5b753c100013d6cba (string) - Unique identifier.
### Authenticate [GET]
+ Request JSON Message
+ Headers
Accept: application/json
+ Response 200 (application/json)
+ Body
{
"authenticate": true
}
## OptOut [/{unsubscribe}]
+ Parameters
+ unsubscribe: 5a40e9b5b753c100013d6cba (string) - Unique identifier.
### Unsubscribe [GET]
+ Request JSON Message
+ Headers
Accept: application/json
+ Response 200 (application/json)
+ Body
{
"unsubscribed": "name@example.com"
}
```bash
# Create `.env` file
cat > .env << EOL
MONGODB_ADMIN_USER=
MONGODB_ADMIN_PASS=
MONGODB_APPLICATION_DATABASE=
MONGODB_APPLICATION_USER=
MONGODB_APPLICATION_PASS=
POSTMARK_FROM=
POSTMARK_KEY=
DOMAIN=
EOL
# Build and run all the containers in a deamon mode
$ docker-compose -f docker-compose.yml up -d
# Build independently
# mongodb
$ docker-compose -f docker-compose.yml build mongodb && \
docker-compose -f docker-compose.yml up -d mongodb
# app
$ docker-compose -f docker-compose.yml build app && \
docker-compose -f docker-compose.yml up -d app
# Or add to `.bash_aliases`
dcb () {
docker-compose -f docker-compose.yml build "$@" && \
docker-compose -f docker-compose.yml up -d "$@"
}
$ dcb [service_name]
```