Skip to content

The Tango Newsletter project is designed to demonstrate the use of APIs. The Newsletter itself is not a real service, but the Sign Up form adds the user onto a live mailing list on MailChimp.

Notifications You must be signed in to change notification settings

MukundAravapalli/TangoNewsletter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tango Newsletter

About

The Tango Newsletter is a monthly newsletter that gives the subscriber access to curated articles about luxurious pursuits. Once the user enters their name and email, their email is added onto a MailChimp server and they just have to sit back and relax as articles of tropical luxury reach their mailbox. The newsletter itself is not real, but the MailChimp server is real and running.

Visit the Site

Here is a live version of the Tango Newsletter that was launched through the Heroku service.

Sign Up Page

Sign Up Page Screenshot This is what the home landing page of the website looks like

Success Page

Success Page Screenshot If everything is successful and your email has been added to the MailChimp server then this is the page that you will see

Failure Page

Failure Page Screenshot If things don't turn out well then, this is the page you will see. This usually occurs because there is an error in the code or an error with the API Key. Clicking on the Try Again button will lead you back to the Sign Up page.

Examples

Let us look at some examples of successful Sign Ups. Failure Page Screenshot Failure Page Screenshot Failure Page Screenshot Failure Page Screenshot

If we look at the bottom of the MailChimp Dashboard, we see that those 3 people have successfully subscribed for the Newsletter.

Origins

I learnt how to build and launch a NodeJS Web App onto Heroku through Dr. Angela Yu's Web Developement Bootcamp on Udemy. I learnt the concepts from her and modified the Web App to my liking.


Want to Create Your Own Newsletter?

Download and customize the uploaded code

Apart from the files that I have uploaded in the repository, you will also need to download:

  1. node.js which you can download here
  2. Once you have node.js on your system, open the command line and navigate to where you have saved the Tango Newsletter files. Then enter the following commands to install: express.js, body parser, and request
    npm init
    npm i express body-parser request
    

You will also need to edit some of the code in the app.js file. Starting around line 43, we see the following code block

const jsonData = JSON.stringify(data);
    const url="https://usX.api.mailchimp.com/3.0/lists/enter your auidence ID here";
    const options={
        method:"post",
        auth:"Crabb: enter your API key here"
        

On the second line, you see the code const url="https://usX.api.mailchimp... here it has a big X in https://usX.api, you will need to replace the X with the region number, this is at the end of your API Key, and it will say us-- where the -- part is the number.

At the end of the URL link, you see the phrase enter your auidence ID here. You will find this ID in the Settings under the Audience Tab in your MailChimp Profile once you have set that up.

Finally, you will need to edit the phrase enter your API key here in the last line of code by replacing the phrase with your MailChimp API Key.

NEVER post any code that contains your API Key, your Key will get revoked if it ends up publicly posted.

About

The Tango Newsletter project is designed to demonstrate the use of APIs. The Newsletter itself is not a real service, but the Sign Up form adds the user onto a live mailing list on MailChimp.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published