This is a simple newsletter / email list signup server with MailChimp Integration. This project is using express.js server, feel free to use it on your own application.
- Head over to Node and install Node.js
- Note, npm is automatically installed with Node there is no need for additional installation
- Installation
- Run the following command in your terminal.
npm install -g yarn
- Run the following command in your terminal
npm install
- Run the following command in your terminal
yarn
Note* You only need to run one of the above depending on the choice of package manager you wish to use, please ensure you're in the directory of the project on your terminal when setting up dependencies.
const url = 'https://usX.api.mailchimp.com/3.0/lists/listID key'
- Replace usX with the .usX value at the end of your mailchimp api key where X is a numeric value such as us1
- Replace listID with your mailchimp listID key.
In the App.js file head over to line 29
const options = {
method: "POST",
auth: "username:apiKey"
}
- Replace the username:apiKey with the following
- username with your mailchimp username
- apiKey with your mailchimp api key