retrobox / newsletter-api

[OLD] Simple API made with node to subscribe email to a Mailchimp list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newsletter API

Simple API made with node to subscribe email to a mailchimp list

Installation

  • clone this repository
  • npm install
  • Puts your environments varibles in a .env file
  • node app.js

You can use Pm2

Usage

POST /subscribe
{
  "email": "hello@example.com"  
}

Environments variables

Example of .env file in .env.example.

Name Example value
LISTEN_PORT 80
MAILCHIMP_SUBSCRIBE_URL https://XXX.api.mailchimp.com/3.0/lists/XXXX/members
MAILCHIMP_API_KEY XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DISCORD_WH_URL https://discordapp.com/api/webhooks/ID/TOKEN

About

[OLD] Simple API made with node to subscribe email to a Mailchimp list


Languages

Language:JavaScript 100.0%