npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

super-easy-forms

v2.1.4

Published

a script that generates serverless backends for contact forms using AWS

Downloads

6

Readme

**This is the repo for Super Easy Forms 2.0. The First Version has been moved to this other repo Super Easy Forms

License Build Status Read the Docs

Super Easy Forms is a tool that generates serverless web forms (front-end and back-end) in seconds. it leverages CloudFormation to create all of your necessary resources in the AWS cloud including a A Dynamo DB table, an API Gateway endpoint, and a Lambda function. It also automatically generates a ready-to-go html contact form that you can copy-paste into your site. the tool is fast, easy to use/integrate, and completely free as all the AWS resources created have a free tier. Version 2.0 now features increased usability, security, and flexibility.

Pre-requisites

  • Make sure you have node.js (10.x +) and npm installed. You can checkout this tutorial to install npm and node in mac, linux (debian/ubuntu).
  • Have an AWS account. If you don't have an AWS account, you can easily create one here. Don't worry, everything you do with this project will fall within the AWS free tier limit!

Installation

  1. if you dont have an existing static website project you can create a new directory mkdir project-name replacing project-name with the desired name for your project.

  2. Go into your desired project's directory cd project-name and install super easy forms npm install super-easy-forms

  3. Install the super easy forms CLI globally npm install -g super-easy-forms-cli

  4. Run the build command Run sef build -r=your-aws-region -p=profile-name from the root of your project's directory. replace profile-name with the desired name of the IAM user and your-aws-region with the desired AWS region code.

  5. Finish creating your IAM user in the AWS Console and hold on to the access keys. If you had already created your IAM user you can ignore this step and close the browser window.

  6. Update the local profile in your machine. The local profiles are stored in ~/.aws/credentials in mac/linux or in C:\Users\USER_NAME\.aws\credentials in windows. you can create/edit this file by runing sudo nano ~/.aws/credentials. add the profile keys in the format shown bellow.

     [profilename]
     aws_access_key_id = <YOUR_ACCESS_KEY_ID>
     aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>

Create a serverless form

  1. run sef init formname replace formname with the name you want to give to your new form. For example the domain name followed by paymentform.

  2. edit the config file saved in ./forms/formname/config.json and add values for the variables shown bellow following the same format. captcha, emailMessage and emailSubject are optional.

  3. run sef fullform formname

     {
       "email":"[email protected]",
       "formFields":{
         "fullName": {"type":"text", "label":"Full,Name", "required":true},
         "email": {"type":"email","label":"Email","required":true},
       },
       "captcha":false,
       "emailSubject":"",
       "emailMessage":"",
     }

    Optionally you can provide your desired values directly as CLI flags without having to edit the config file as shown in the command bellow.

    sef fullform formname [email protected] --fields=fullName=text=required,email=email=required

Using the API

    const SEF = require('super-easy-forms')

    SEF.CreateForm(formName, options, function(err, data){
            if(err) console.error(err)
            else{
                    //Do Something
            }
    })