1.0.4 • Published 4 years ago

awsdomainchecker v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Basic Overview

Awsdomainapi License awsdomainchecker SudirlayCoders Matt Trotter Code Gaurantee

Setup IAM Access for runtme environment security

See here for instaling pip - https://pip.pypa.io/en/stable/installing/ See here for configuring IAM policy for route53 - http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/access-control-managing-permissions.html

pip install awscli
aws configure
Installing awsdomainchecker: standard npm installation
npm install awsdomainchecker
Application integration: In your main app.js file, require this module
const awsdomainchecker = require('awsdomainchecker');

Running awsdomainchecker: After you require the module simply start your app

Running it is easy, anytime your main app starts awsdomainchecker will auto-start You should get the returned output:

awsdomainchecker listening on http://localhost:8135

Making changes to listening port

Locate the node_modules folder where you have my module 'awsdomainchecker', edit the index.js and change listening port

port = 8135;
app.listen(port);

See the neatly coded brains of my index.js

app.use(bodyparser.urlencoded({extended: true}));
app.use(bodyparser.json());



app.get('/', function(req, res){
    console.log('GET /')

  const html = fs.readFileSync('index.html');
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end(html);
});

app.post('/', function(req, res){
    console.log('POST /');
    console.dir(req.body);
const route53domains = new AWS.Route53Domains();
res.writeHead(200, {'Content-Type': 'text/html'});

How to test Domain availability?

During testing, simply use curl to generate post request only specifying the domain name with top level domain. "domainname.tld". You can add sanitization around this from your application UI side once running. Contributors to this project should also be looking forward to oauth integration coming soon, in the mean-time security is on you to sanitize for the time being.

curl -d "DomainName=domain.com" localhost:8135

You should get the returned output:

This Domain is: status <UNAVAILABLE> | <AVAILABLE>

More to come soon.... Invented By: Matthew Trotter {C.E.O SudirlayCoders}