Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Automattic/team51-w3c-validator-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Originally thought as a CLI tool, this project is now an API that receives a URL as parameter, evaluates the HTML using the W3C validator, and returns the result in JSON format, ready to be posted to a P2.

It is used by the Team51 Monitor tool to evaluate our sites periodically. Results are posted on https://team51validator.wordpress.com/

The API is hosted in Team51 AWS instance.

Installation

For local development, clone the site and run npm install

Use

You can start a local Express server by running node app.js

http://localhost:3000/evaluate?url=https://url-to-evaluate.com

On Production, this was deployed using PM2 package: pm2 start app.js --name "Team51 HTML Validator" -- run start

http://ec2-[my-server].us-east-2.compute.amazonaws.com:3000/evaluate?url=https://url-to-evaluate.com

Known issues

  • W3C API might respond some times with two message types different than error and info. If a fatalerror is returned, it won't be processed correctly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published