Collect emails from a funnel page.
-
Install node
webi node source ~/.config/envman/PATH.env
-
Clone and Enter the Repo
git clone https://github.com/bnnanet/funnel-api.git pushd ./funnel-api/
-
Configure & Change the Message Template
cp -rRP example.env .env vim .env vim app.js
-
Install deps and run
npm ci npm start
-
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}"'" } '
-
Save as system service
sudo env PATH="$PATH" \ serviceman add \ --path="$PATH" \ --name funnel-api \ --system \ --username "$(whoami)" \ -- \ npm start