New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

super-easy-forms

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

super-easy-forms

a script that generates serverless backends for contact forms using AWS

latest
Source
npmnpm
Version
2.1.4
Version published
Maintainers
1
Created
Source

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



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

  • 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.

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

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

  • 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.

  • 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.

  • 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

  • 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.

  • 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.

  • run sef fullform formname

     {
       "email":"your@email.com",
       "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=your@email.com --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
            }
    })

Keywords

node.js

FAQs

Package last updated on 19 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts