Skip to content

bnnanet/funnel-api

Repository files navigation

funnel-api

Collect emails from a funnel page.

  1. Install node

    webi node
    source ~/.config/envman/PATH.env
  2. Clone and Enter the Repo

    git clone https://github.com/bnnanet/funnel-api.git
    pushd ./funnel-api/
  3. Configure & Change the Message Template

    cp -rRP example.env .env
    vim .env
    vim app.js
  4. Install deps and run

    npm ci
    npm start
  5. Test with curl:

    my_email="[email protected]"
    
    curl -X POST http://localhost:2662/api/request-invite \
        -H 'Content-Type: application/json' \
        --data-binary '
            {
                "email": "'"${my_email}"'"
            }
        '
  6. Save as system service

    sudo env PATH="$PATH" \
        serviceman add \
        --path="$PATH" \
        --name funnel-api \
        --system \
        --username "$(whoami)" \
        -- \
        npm start

Releases

No releases published

Packages

No packages published