Skip to content

SMCProgrammingClub/mailing-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailing-list

A small API to add emails to our Mailchimp mailing list

Setup

Clone the repository and install dependencies

$ git clone git@github.com:smcprogrammingclub/mailing-list.git
$ npm install

Sign into the club's Mailchimp and grab an API key. Next, find the list ID of the mailing list. Create a .env file in the project root and save your API key and list ID:

MAILCHIMP_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXX
MAILCHIMP_LIST_ID=XXXXXXXXXX

Usage

Run the server with npm start

Make a POST request to the server with a JSON email parameter.

Using cURL (Terminal)

$ curl -H "Content-Type: application/json" -X POST -d '{"email":"lisa@jupiter.com"}' http://localhost:3000

Alternatively, use Postman for a GUI tool.

Deployment

Install and login to now. From the root of the project, run now -E to deploy the server.

About

A small API to add emails to our Mailchimp mailing list

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published