Giter Club home page Giter Club logo

netlify-under-construction-starter's Introduction

Netlify Under Construction Starter

Simple Under Construction website starter with user subscription form that can be deployed on Netlify.

Why?

Simple coming soon or under construction websites can be freely hosted on a number of static website hosting providers but user subscription forms usually include calls to either email marketing services APIs, private databases, etc., which may include sensitive data such as API keys.

With serverless lambda functions we can benefit from running sensitive backend code on a static website provider such as Netlify. Check out more details here.

Getting Started

Fork the project into your own repository. Note that Netlify supports drag & drop deployments from your local hard drive but serverless Lambda Functions won't work without linking to a repository.

Prerequisites

Create a Mailchimp account or use your existing one and get your API Key and List ID from your dashboard. This steps should be similar for any other mailing service you want to integrate. Make sure to check out their own documentation.

Local Development

To run the starter project on your machine, clone the repository on your local hard drive and create a new .env file in the root of the project with the following content:

LAMBDA_ENDPOINT=http://localhost:9000/subscribe_mailchimp    # or the name of your own lambda function file
API_KEY=XXXXXXXXXXX                                          # your Mailchimp API KEY
LIST_ID=XXXXXXXXX                                            # your Mailchimp List ID

Run npm install to install dependencies and npm run dev to start the webpack dev server and build and host the lambda functions. Access the page at http://localhost:8080/.

More details about building and running lambda functions here.

Installation

Create a new Netlify account if you don't have one.

From your Netlify dashboard, connect your account with the project repository and add the following environmental variables:

  • Your Mailchimp API_KEY and LIST_ID
  • A LAMBDA_ENDPOINT with the value of .netlify/functions/subscribe_mailchimp

Follow the Netlify documentation to add a custom domain name and SSL certificate before promoting your website.

Feel free to change the layout and/or email marketing service provider!

Thanks

Big thanks to bradtraversy's excelent serverless lambda functions video and alexmacarthur's netlify lambda functions example.

Image courtesy of Pexels.com.

Contributing

Feedaback, bug reports, pull requests are always welcome!

License

MIT

netlify-under-construction-starter's People

Contributors

ctudorache87 avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.