project by @trinajoy
A simple newsletter signup using Mailchimp API, Bootstrap, Express App & hosted on Heroku.
- Add a subscriber to a mailing list
- Design based on KOOKAI newsletter: https://kookai.co.uk
- Use custom environment variables to hide Mailchimp API Key
- see
.env_sample
for how to add api key - add
.env
to.gitignore
- add
dotenv
to projectnpm i dotenv
- require
dotenv
in app.js after requiringexpress
- use in app.js:
process.env.API_KEY
- see documentation: https://medium.com/@asbillings2007/hide-your-api-keys-71e7bab3af69
- Procfile : tell Heroku how to launch the app
- add Config Vars : API_AUTH, API_KEY, LIST_ID
- image: unsplash: caique-silva-BOHyxqepP9Y-unsplash.jpg
- npx nodemon app.js