0.0.4 • Published 7 years ago
validate-localhost v0.0.4
Validate Page
Getting html from page of localhost then validate the code.
This package is using validator.w3.org/nu for validation with html-validator package.
usage
Please launch local server before to run below command.
validate-localhost --port=8000 --path=/any/pathOptions
It's able to pass options via command line arguments.
--port={port}- set theport. default is3000.--path={rootPath}- set therootPath. default is/.--secure- if passed--secureargument then set the protocol tohttps.--pc- if passed--pcargument UserAgent is behaved like it. this is default.--sp- if passed--spargument UserAgent is behaved like it.--tb- if passed--tbargument UserAgent is behaved like it.
If you want to use the package in your own script on the Node.js then call the package and pass options like below:
const validateLocalhost = require('validate-localhost');
validateLocalhost({
port: 8000,
path: '/any/path',
sp: true
}).then(result => {/* */}).catch(err => {/* */});