express-formgen
v0.1.1
Published
A simple express-middleware for generating forms
Downloads
3
Readme
express-formgen
What is it?
What express-formgen does, is generate forms so you only have to input simple data to generate complex forms. Primarily designed for login, register and contact forms. The config is very easy to learn!
Installation and tests
install with npm: npm i --save express-formgen
test with npm: npm test
Example
app.js:
const app = require('express')();
const eform = require('express-formgen');
const cfg = require('./config');
eform(cfg)
app.use('/', eform.router);
app.listen(8080)
config.js:
module.exports = {
title: "Login",
action: "",
method: "post",
fields: [
{
type: "text",
placeholder: "username",
name: "username"
},
{
type: "password",
placeholder: "password",
name: "password"
}
]
};